Add configurable server header read timeout#7262
Conversation
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 1 changed, 0 removedBuild ID: b2627a81ee8c875f8d033c6c URL: https://www.apollographql.com/docs/deploy-preview/b2627a81ee8c875f8d033c6c |
This comment has been minimized.
This comment has been minimized.
|
CI performance tests
|
3a0f10b to
c41fdbd
Compare
glasser
left a comment
There was a problem hiding this comment.
I'll leave full review up to Router experts, but this looks reasonable from a high level, modulo lint/changelog/docs/etc.
I think we should do better than Hyper and actually define the term "header read timeout" in our docs. Our understanding is that this a timeout applied to any incoming connection when it is in any state other than "request headers have been read", setting an amount of time for headers to be read; it applies both when the connection is fully idle and when a request has been started but the headers have not been completed.
7f1fbd2 to
48c6473
Compare
goto-bus-stop
left a comment
There was a problem hiding this comment.
It might make sense to put this in the existing supergraph configuration rather than introducing a new server group. supergraph.listen, supergraph.connection_shutdown_timeout, supergraph.early_cancel and supergraph.experimental_log_on_broken_pipe are on a similar "level" as header_read_timeout. I don't feel that strongly though, maybe @BrynCooke has some input around that.
The implementation looks good to me, but it does require a changeset and documentation (at least in docs/source/routing/configuration.mdx).
|
@goto-bus-stop I discussed where to put it with @BrynCooke and we landed on I'll definitely add a changeset and documentation. I just wanted to land on code-complete (in case of changes like we're discussing) before I did. |
|
If it's already been discussed then I don't mind keeping it as it is :) |
|
@goto-bus-stop We need to start moving stuff out of the supergraph section, it's a dumping ground at the moment. |
2cac368 to
54ae7c5
Compare
7ccb988 to
fd6480b
Compare
fb8295b to
8e22896
Compare
This change exposes the server's header read timeout as the
server.http.header_read_timeoutconfiguration option.By default, the
server.http.header_read_timeoutis set to previously hard-coded 10 seconds. A longer timeout can be configured using theserver.http.header_read_timeoutoption.Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩