Create an interruptible cloud server
An interruptible cloud server is a cloud server that runs for no more than 24 hours after creation and can be stopped by Servercore at any time, for example, if the virtual host does not have enough resources for other cloud servers.
When a system interrupt occurs, the cloud server is not deleted — it stops and goes into EXPIRED
status. After the interruption, the server can be restored. A server with a network boot disk retains all data, while a server with a local boot disk deletes all data. Learn more about restoring an interrupted server.
Interruptible servers support all the features that are available for regular cloud servers, while costing an average of 70% less.
You can make the cloud server interruptable when you create the server or afterwards by changing the server type. You can make a server of any configuration intermittent.
What tasks are suitable for
Suitable for fault-tolerant systems where multiple servers are used and when some of them fail, the load is redistributed to other servers:
- for parallel batch data processing;
- CI/CD testing;
- Hadoop and Kubernetes projects;
- scaling fault-tolerant web services during peak load times;
- any fault-tolerant projects with variable load.
Limitations
Interruptible cloud servers are temporarily available only in the ru-7 pool.
We do not guarantee the same level of availability as conventional cloud servers .
Cost
The cost of an interruptible server is on average 70% lower than the cost of a regular cloud server with the same configuration.
During operation, intermittent cloud servers are paid for using the cloud platform payment model.
After the interruption:
- vCPU, RAM, GPU, local disks are no longer charged starting from the next hour after the stop;
- public IP addresses, public subnets and network disks continue to be charged.
Create an interruptible server
An interruptible server will be stopped by Servercore at any time within 24 hours of creation.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Click Create Server.
- In the Advanced Settings block, check the Interruptible Server checkbox.
- Select the rest of the server settings — see the Create Cloud Server instructions for details.
- Click Create.
-
Create a cloud server:
openstack server create \
[--image <image> | --volume <volume> | --snapshot <snapshot>] \
--flavor <flavor> \
--availability-zone <pool_segment> \
--nic net-id=<net_uuid> \
--security-group <security_group> \
--key-name <key_name> \
--tag preemptible --os-compute-api-version 2.72 \
<server_name>Specify:
- source type:
--image <image>
— to create a server from off-the-shelf or custom image. Parameter<image>
— ID or name of the image. The list of images can be viewed withopenstack image list
;--volume <volume>
— to create a server from network disk. Parameter<volume>
— ID or disk name. You can view the list of network disks usingopenstack volume list
;--snapshot <snapshot>
— to create a server from snapshot. Parameter<snapshot>
— ID or name of the snapshot. The list of snapshots can be viewed withopenstack snapshot list
;
<flavor>
— The ID or name of the flavor. The flavors correspond to cloud server configurations and determine the number of vCPUs, RAM, and local disk size (optional) of the server. You can use fixed configuration flavors or create a flavor. For example,4011
— ID to create a Memory Line fixed configuration server with 2 vCPUs, 16 GB RAM in a ru-9 pool. You can view the list of flavors usingopenstack flavor list
or in the table List of fixed configuration flavors in all pools;<pool_segment>
— pool segment in which the cloud server will be created, e.g.ru-9a
. The list of available pool segments can be found in the instructions. Availability matrices;<net_uuid>
— ID of the private or public network to which the server will be connected. The list can be viewed withopenstack network list
;<security_group>
— The ID or name of the security group. To create a server with a security group, port security must be enabled on the network. port security. The list of groups can be viewed with the commandopenstack security group list
;<key_name>
— name of the SSH key pair for the service user. If SSH keys are not created, generate them. The list can be viewed withopenstack keypair list
;--tag preemptible --os-compute-api-version 2.72
— tag to create a preemptible server;- optional:
--block-device-mapping vdb=<extra_volume>
— ID or name of the extra disk. The list can be viewed withopenstack volume list
; - optional:
--tag <tag_name> --os-compute-api-version 2.52
— tag to add more information about the server; - optional:
--user-data <user_data.file>
— path to the script with Base64 encoded data. Scripts and tasks from the script will be executed at the first boot of the operating system. Examples of scripts can be found in the User data instruction; <server_name>
— server name.
- source type:
Change server type
You can change the type of cloud server — make an uninterruptible server interruptible and vice versa.
An interruptible server will be stopped by Servercore at any time within 24 hours of creation. You can only change the server type to interruptable once every 24 hours.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- Open the server page → Configuration tab.
- In the Server Type block, click .
- Check the new server cost and click Change.
-
Change the server type to interruptible:
openstack server set \
--tag preemptible \
--os-compute-api-version 2.72 \
<server>Or uninterrupted:
openstack server unset \
--tag preemptible \
--os-compute-api-version 2.72 \
<server>Specify
<server>
— server ID or name, can be viewed using theopenstack server list
command
Restore an interrupted server
You can restore an interrupted server to EXPIRED
status — resume its operation.
Recovery depends on the type of boot disk:
- if the disk is networked, the server recovers from the disk and continues to operate in the state it was in when it stopped;
- if the disk is local, a new cloud server is created from the image from which it was created. Data that appeared on the server during the process is not restored.
Once restored, the server will continue to be intermittent and will be stopped by Servercore at any time within 24 hours of restoration.
Control panel
OpenStack CLI
- In the Control panel, on the top menu, click Products and select Cloud Servers.
- From the server's menu, select Resume.
-
Reactivate the cloud server:
openstack server unshelve <server>
Specify
<server>
— server ID or name, can be viewed using theopenstack server list
command