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?

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
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ