Score:0

Oracle Cloud - Graceful termination of compute instances in an instance pool

my flag

We have an application that we want to run in OCI instance pool and preferably also connect to OCI auto scaling configuration. Whenever a scale-in event occurs, our application is sticky and might continue to handle the current ongoing sessions for the next 4-5 hours before finally draining out the users and triggering termination. The current approach we are thinking of is listening to the "Terminate Instance Begin" event as mentioned in this link and use OCI commands to run a graceful termination script in our instance which will wait till all the users are drained out.

If we listen to this "Terminate Instance Begin" event and trigger our graceful termination script, does oracle cloud wait for the script to finish execution(at least for few hours) before terminating the instance? If not, Is there any way to listen to this event and cancel the termination and trigger termination from our script?

Or, Is there any other approach to handle this scenario in OCI using autoscaling instance pools?

Michael Hampton avatar
cz flag
The documentation you linked to seems to have an answer already: "The maximum time that a script can run is 1 day."
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.