http-add-on icon indicating copy to clipboard operation
http-add-on copied to clipboard

Handle signals in the interceptor & drain requests

Open arschles opened this issue 2 years ago • 0 comments

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:

  1. It should stop accepting new incoming requests (and connections)
  2. It should continue processing existing pending requests
  3. Only after (2) is done, it should shut down

cc/ @asw101 since we discussed this earlier offline.

arschles avatar Jan 19 '22 23:01 arschles