-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buffering/corruption of gRPC stream response #2264
Comments
Wireshark suggests that the server in the example is sending the packets to traefik once per second, the traefik process ACKs, but the packets are not forwarded on. |
This appears to be due to oxy buffering the responses. adding |
FWIW, swapping forward out of reverseproxy causes the same buffering behaviour unless a |
I'm thinking of making Streaming configurable via an annotation. I'm experiencing another problem in production where, after an undermined (but long'ish), time, my gRPC streaming endpoints just start getting 502s. Forwarder complains about " stream error: stream ID 238203; PROTOCOL_ERROR". I'm nnot sure what is causing that, but am vaguely hopeful that streaming may solve both. |
oxy/forward seems to have quite a bit of overhead. Makes copies of requests and headers, it's generally fairly complicated. ReverseProxy shows improved latency, throughput and stddev of latency, and not real difference in CPU usage (slightly lower insn/cycle, probably due to more time waiting on IO vs shuffling data). |
Closed by #2309. |
I'm not convinced that streaming for all HTTP/2 is really the best approach. Additionally, when I did enable streaming I saw another error (the one mentioned above |
What did you do?
We use traefik as a gateway for some of our gRPC services.
Single calls, and streaming requests appear to work fine.Streaming
responses are being buffered somewhere.
I've put together a small test case at:
https://github.com/tcolgate/grpcbuffer
What did you expect to see?
traefik should forward the individual response messages as they are sent
What did you see instead?
If I create messages around 512 bytes, and send them once a second, messages
are passed on in batches of 8
Output of
traefik version
: (What version of Traefik are you using?)What is your environment & configuration (arguments, toml, provider, platform, ...)?
If applicable, please paste the log output in debug mode (
--debug
switch)There is no relevant output
The text was updated successfully, but these errors were encountered: