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
질문됨 일 년 전1189회 조회
1개 답변
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠