1

I'm planning to run an ECS cluster with an ALB in front of spot instances.
As an example: A user's request enters a container that is running on spot, but before getting the response, the spot instance is terminated. That will return an error, right?

How can I resolve this type of issue?

Is there any way to stop sending requests before it was gone?

Maurice
  • 11,482
  • 2
  • 25
  • 45
Arghya Roy
  • 429
  • 3
  • 13

1 Answers1

1

You can enable something called as ECS_ENABLE_SPOT_INSTANCE_DRAINING, it will change the instance to draining state and no new requests would come to this instance. The time frame is 2 minutes, if your requests will be longer then the user would get error.

Maurice
  • 11,482
  • 2
  • 25
  • 45
Vikram S
  • 792
  • 4
  • 7