Support a configurable GraphQL request timeout for both reactive and synchronous controllers #1150
Labels
status: waiting-for-feedback
We need additional information before we can continue
status: waiting-for-triage
An issue we've not yet triaged
Now that reactive request cancellation is supported (#1149), it would be really nice if we could configure a request timeout for a server. An example use case for this is a GraphQL server that lives behind a reverse proxy and the reverse proxy has a configured max timeout. In this scenario, a may request a GraphQL request and proxy returns a 408, but the server is still executing the potentially long running work. If the server sets the request timeout to the same value as the reverse proxy, it can avoid spending resources processing requests that have already been terminated.
For Reactive requests, the timeout value should be set. For synchronous/virtual thread calls, thread interrupts could be leveraged.
I'd like to see some simple configuration like
spring.graphql.timeout=10s
The text was updated successfully, but these errors were encountered: