http-add-on
http-add-on copied to clipboard
Handle signals in the interceptor & drain requests
The interceptor should not just shut down when it receives a signal. Instead, it should ensure that all requests are complete and then shut down.
Use-Case
When KEDA scales the interceptor pool down, or a user manually shuts down an interceptor pod, the interceptor should not sever the connection. Instead, it should complete the pending requests (some of which may be hanging for a long time, while they wait for replicas to be available) and then shut down.
Specification
When interceptor receives a signal:
- It should stop accepting new incoming requests (and connections)
- It should continue processing existing pending requests
- Only after (2) is done, it should shut down
cc/ @asw101 since we discussed this earlier offline.