Amazon ECS integrated with Ocean uses a draining process to safely remove container instances while allowing running tasks to complete. This article explains how ECS draining operates, the default timeout settings, and what occurs when the timeout is reached.
Draining timeout
When no draining timeout is defined, Ocean uses a default value of 900 seconds (15 minutes). Ocean enforces a minimum draining timeout of 900 seconds. If a user sets a value less than 900, Ocean still applies 900 seconds.
If a user specifies a draining timeout greater than 900 seconds, Ocean will apply the user-defined value.
Draining process
When an ECS-integrated instance is detached:
-
Ocean retrieves these instances and applies the following steps:
-
Instances without container instances that passed their grace period: Marked for termination.
-
Container instances not drained: Initiate draining.
-
Container instances with running tasks: Stop the tasks.
-
Instances in DRAINING status with zero tasks: Marked for termination, logging The following instances have finished draining.
-
-
If an instance approaches its termination time (within 2 minutes of the drainingTimeout limit), it is marked for termination, logging The following instances have passed their draining grace period and will be deleted:
-
Finally, Ocean terminates all instances marked for termination.
Important behavior
Even if the termination grace period has not fully elapsed, if an instance is in DRAINING status and all its tasks have successfully stopped, Ocean will terminate it immediately.
Outcome
By understanding ECS draining behavior and configuring an appropriate draining timeout, workloads maintain high availability during instance termination without task interruption.
Related Articles
Understanding the relationship between Ocean draining timeout and Kubernetes pod terminationGracePeriod 20Number of Views Understanding how draining timeout and termination grace period work together 18Number of Views Understand HPA behavior in Ocean EKS clusters 21Number of Views Understanding Flexera One UI session timeout behavior 15Number of Views Security group behavior for nodes with IP persistence in Ocean 6Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago