Terminating Compute Instances
Last updated: 2024-01-22 22:15:47
Terminating Compute Instances
Last updated: 2024-01-22 22:15:47
Overview
This practice provides a better method to terminate CVM instances when you need to dynamically adjust the compute instances for a Turbo file system. This method avoids lock conflict caused by improper operations.
When users need to terminate CVM instances, they usually call TerminateInstances. However, this API will force the instances to shut down (similar to cutting off the power) and return them. This method achieves fast termination, but for CFS Turbo, a strongly consistent distributed file system, the force client disconnection will make the server lock recall abnormal, which will lead to IO hangs. To avoid affecting business, we recommend you terminate instances using the method provided in this document. Directions
Shutting down CVM instances
Call StopInstances to shut down instances, with StopType set to SOFT_FIRST. A soft shutdown will be performed. If the soft shutdown fails within 5 minutes, a forced shutdown will be performed. This method takes the timeliness of the shutdown into account, without affecting the normal use of the Turbo file system. Note:
1. Do not set StopType to HARD (forced shutdown).
2. When you perform a shutdown using the console, do not select forced shutdown. Select SOFT_FIRST.
3. A soft shutdown terminates processes in an orderly manner and performs a sync operation, minimizing the impact of a forced shutdown on the distributed lock in a Turbo file system.
Terminating instances