apache / apache/trafficserver

Http2Stream may not be used across threads

Open
#8,044 4 comments 0 reactions 0 assignees View on GitHub
HTTP/2 Performance Stale
Dominant language
C++
Stars
2k
Forks
874
Avg merge
6d 15h
Merged PRs (30d)
46

Description

The code below implies Http2Stream's event handler can be called from multiple threads, but I'm not sure if it really happens.
https://github.com/apache/trafficserver/blob/aa1d73b07fdb43f7e77f1fb72630f91a7086c366/proxy/http2/Http2Stream.cc#L143-L149

@masaori335 says switching threads is necessary for global server session pool, but we have `UnixNetVConnection::migrateToCurrentThread` and I think it ensures a server session is always on the same thread as the client session.

If `Http2Stream` is used always on the same thread we should be able to remove the logic, and it would improve performance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.