Is it possible to send a SIGTERM signal before connection draining when deploying a new task definition in ECS?

0

We have an application that requires clients to have long lasting socket connections, and have code in place application side to gracefully handle a SIGTERM event. It does depend on connections remaining established but my observation is that the SIGTERM happens after the de-registration delay has elapsed and thus all active connections are killed.

Is there a mechanism by which the SIGTERM can be sent before connection draining starts, or perhaps some other signal that would otherwise tell us that the application instance will soon be terminated?

alibc
posta un anno fa1189 visualizzazioni
1 Risposta
0

The ALB connection draining will always happen before a SIGTERM signal is sent to the container. After the deregistration delay any remaining connections will get 5xx errors and SIGTERM is sent to the container. The 'Reacting to SIGTERM' section of the Graceful shutdowns in ECS blog has a diagram describing the sequence of events when a service is scaled down.

AWS
Noah_L
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande