To meet persistent storage requirements, you can mount Alibaba Cloud disks to containers. This prevents data loss caused by container restarts or migrations. The Container Storage Interface (CSI) plug-in allows you to use persistent volume claims (PVCs) to mount statically and dynamically provisioned volumes.
How to select an Alibaba Cloud disk
Alibaba Cloud disks are block-level data storage resources for Elastic Compute Service (ECS), which provide low latency, high performance, high durability, and high reliability. Alibaba Cloud disks are classified based on performance. You can use Enterprise SSD (ESSD) AutoPL disks, ESSDs, ESSD Entry disks, or disks of the previous generation, such as standard SSDs, ultra disks, and basic disks. The following table describes the comparison of different cloud disk types. You can select a disk type based on your business scenario. For more information, see Overview of Block Storage.
Disk Category | Feature | Usage scenario | Billing |
|
|
| |
| Latency-sensitive applications or I/O-intensive business scenarios, such as:
| You are charged for disk capacity. | |
ESSD Entry disks Note ESSD Entry disks can be attached only to instances of universal instance families and the e economy instance family. |
|
| You are charged for disk capacity. |
Cloud disks of the previous generation
Standard SSDs, ultra disks, and basic disks are cloud disks of the previous generation and are unavailable for purchase in specific regions and zones. We recommend that you use ESSDs at performance level 0 (PL0 ESSDs) or ESSD Entry disks instead of ultra disks and basic disks and use ESSD AutoPL disks instead of standard SSDs.
Cloud disk category | Feature | Usage scenario | Billing |
Standard SSDs |
|
| You are charged for disk capacity. |
Ultra disks |
|
| You are charged for disk capacity. |
Basic disks | Deliver high cost efficiency. | Low-cost development and testing business that does not require high storage performance | You are charged for disk capacity. |
Limits
Item | Description |
Disk category | You cannot mount or unmount subscription disks. Use pay-as-you-go disks or use disks together with storage capacity units (SCUs). |
Whether it can be shared | Alibaba Cloud disks cannot be shared. Each disk can be mounted to only one pod. |
Relationship with ECS instances |
|
Number of mounted disks and disk capacity |
|
Application type | Mount a disk to a StatefulSet. Note If you mount a disk to a Deployment, you must set the number of replicated pods to 1. In this case, you cannot configure an independent persistent volume (PV) for each pod or prioritize the node on which you want to mount or unmount a disk. If the pods of the Deployment are restarted, disk mounting may fail due to the update policy. We recommend that you do not mount a disk to a Deployment. |
Configure Application Parameters | If you configure the securityContext.fsgroup parameter in the application template, the kubelet performs the |
Disk types
Performance indicator | ESSD AutoPL disk | ESSD | ESSD Entry disk | Standard SSD | Ultra disk | Basic disk | |||
Performance Level | An ESSD AutoPL disk can decouple capacity from performance and deliver baseline performance that is equal to the baseline performance of an ESSD PL1 disk. You can configure provisioned performance and burst performance for ESSD AutoPL disks. | PL3 | PL2 | PL1 | PL0 | None | None | None | None |
Single-disk capacity range (GiB) | 1~65,536 | 1,261~65,536 | 461~65,536 | 20~65,536 | 1~65,536 | 10~32,768 | 20~32,768 | 20~32,768 | 5~2,000 |
Max IOPS/Min IOPS | 1,000,000/3,000 | 1,000,000/64,850 | 100,000/24,872 | 50,000/2,800 | 10,000/1,812 | 6,000/1,880 | 25,000/2,400 ② | 5,000/1,960 | Hundreds |
Max throughput/Min throughput (MB/s) | 4,096/125 | 4,000/750.5 | 750/350.5 | 350/130 | 180/100 | 150/101.5 | 300/130 ② | 140/103 | 30~40 |
Formula for calculating single-disk IOPS① | Baseline performance: max{min{1,800 + 50 × Capacity, 50,000}, 3,000} Provisioned performance: min{Provisioned IOPS, 50,000} Burst performance: min{IOPS supported by the instance type, 1,000,000} | min{1,800 + 50 × Capacity, 1,000,000} | min{1,800 + 50 × Capacity, 100,000} | min{1800 + 50 × Capacity, 50,000} | min{1,800+12 × Capacity, 10,000} | min{1,800 + 8 × Capacity, 6,000} | min{1,800 + 30 × Capacity, 25,000} | min{1,800 + 8 × Capacity, 5,000} | None |
Formula for calculating single-disk throughput (MB/s) ① | Baseline performance: max{min{120 + 0.5 × Capacity, 350}, 125} Provisioned performance: min{16 KB × Provisioned IOPS/1,024, Maximum throughput per disk} Burst performance: min{Throughout supported by the instance type, 4 GB/s} | min{120 + 0.5 × Capacity, 4,000} | min{120 + 0.5 × Capacity, 750} | min{120 + 0.5 × Capacity, 350} | min{100 + 0.25 × Capacity, 180} | min{100 + 0.15 × Capacity, 150} | min{120 + 0.5 × Capacity, 300} | min{100 + 0.15 × Capacity, 140} | None |
Data reliability | 99.9999999% | 99.9999999% | 99.9999999% | 99.9999999% | 99.9999999% | 99.9999999% | 99.9999999% | 99.9999999% | 99.9999999% |
Average one-way random write latency in milliseconds (block size = 4 KB) | 0.2 | 0.2 | 0.2 | 0.2 | 0.3~0.5 | 1~3 | 0.5~2 | 1~3 | 5~10 |
API parameter value | cloud_auto | cloud_essd | cloud_essd | cloud_essd | cloud_essd | cloud_essd_entry | cloud_ssd | cloud_efficiency | cloud |
① In the following examples, a PL0 ESSD is used to describe how to calculate single-disk performance:
Single-disk maximum IOPS: The baseline IOPS is 1,800 and increases by 12 per additional GiB to up to 10,000.
Single-disk maximum throughput: The baseline throughput is 100 MB/s and increases by 0.25 MB/s per additional GiB to up to 180 MB/s.
② The performance of standard SSDs varies based on the size of data blocks. Standard SSDs that contain smaller data blocks deliver lower throughput and higher IOPS. The following table provides a comparison of data blocks.
Data block size (KiB)
Maximum IOPS
Throughput (MB/s)
4
Approximately 25,000
Approximately 100
16
Approximately 17,200
Approximately 260
32
Approximately 9,600
Approximately 300
64
Approximately 4,800
Approximately 300
For more information about disk performance, see Block storage performance.
Use scenarios
Applications with high disk I/O requirements that do not need to share data, such as MySQL, Redis, and other data storage services.
High-speed log writing.
Data persistence by using a method that is independent of the pod lifecycle.
Business requirement | Description | References |
Store application data |
| |
Insufficient disk capacity | If you use a dynamically provisioned disk volume and the disk space is insufficient, you can use one of the following methods to expand the disk: For more information, see Overview.
|
|
Change the type of a cloud disk | If your business scenario requires disk expansion and your application requires a higher IOPS, you can upgrade the disk. For example, you can upgrade the disk from standard SSD to ESSD. | |
Back up disk data | Integrate the disk backup (volume snapshots) and restoration mechanism with Container Service for Kubernetes (ACK), and create volume snapshots by using VolumeSnapshots. Restore data by setting dataSource to the related PVC. | |
Encrypt disk data | Disk encryption is suitable for scenarios that require high security or have compliance requirements. You can protect the privacy and autonomy of your data without the need to create and maintain a key management infrastructure. | |
Ensure data security of cloud storage | If data corruption occurs when you expand an ESSD without service interruptions or data loss occurs due to an accidental ESSD deletion, you can use the instant access (IA) snapshot feature of ESSDs to restore the data in the ESSD. |
Billing
Only pay-as-you-go disks can be mounted. When you change the billing method of an ECS instance in your cluster from pay-as-you-go to subscription, you cannot change the billing method of the mounted disks to subscription. Otherwise, the disks cannot be mounted to the cluster. You can purchase SCUs to reduce the disk cost. For more information about SCUs, see SCUs.
StorageClasses are free of charge. Disks that are automatically created by using StorageClasses are billed based on a pay-as-you-go basis.
For information about the billable items of disks, see Block storage devices. For more information about the pricing of disks, visit the ECS product page.
For more information, see Billing.
FAQ
If issues occur when you use disk volumes mounted to containers, see FAQ about disk volumes.
References
You can use the CSI plug-in to create, mount, and unmount volumes. For more information, see Manage the CSI plug-in.
If you require different types of storage resources, you can define multiple types of StorageClasses. For more information, see StorageClass.