0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Kubernetes 長時間バッチはPod再配置を考慮

0
Last updated at Posted at 2026-04-18

概要

k8s(EKS)はメモリやCPUの状況(健康状態)により、定期以外でも勝手にPod再配置が実施されるようです…

APIはたいした問題はなさそうですが、バッチは途中で処理がコケてしまいます。
graceful設定でシャットダウンシグナル受信から数分はコンテナ停止を遅らせることはでますが、数時間動かすバッチなどは限界がありそうです…

【改善案】
 以下のように1回のSQSメッセージ受信処理を小分けにして、残データ処理はNEXT IDを自分自身にSQSメッセージを投げるようにすることで、たとえコンテナ停止したとしても、数分後のSQSリトライで救われるようになるかと思います👍

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?