Overview
A volume set is a collection of storage volumes, which may be linked to one or more workloads running on Control Plane. The behavior varies greatly depending on your choice of filesystem.Traditional File Systems (ext4, xfs)
- Control Plane provisions a unique volume for each replica in the linked workload.
- Each volume set can be used by at most one stateful workload.
- Each volume in the set is bound to a single workload replica
- Data is not replicated between volumes. If you require data sharing or replication, this must be accomplished at the application level (e.g. by using WAL streaming between two Postgresql instances)
Shared File System
- Control Plane provisions a single volume per location
- The volume set can be attached to any number of workloads
- All attached workload replicas in a given location use the same volume
Caveats
The shared filesystem does not support:- snapshots
- certain commands:
createVolumeSnapshotdeleteVolumeSnapshotrestoreVolumedeleteVolume
Capacity and Billing
- When a volume is created, it will have an initial capacity defined by the spec of your volume set.
- Volume capacity can be increased by sending an
expandVolumecommand. - Volume capacity cannot be decreased.
- The bill for a volume set is calculated by summing the reserved GB of all volumes.
Autoscaling
One Volume Per Replica
The only applies to volume sets using traditional file systems (e.g. ext4, xfs)
- Like workloads, volume sets scale horizontally. Every replica in the linked workload is automatically assigned a volume.
- When the linked workload scales down, the volumes are preserved. Volumes are only deleted when you send a
deleteVolumecommand, or when the volume set itself is deleted.
Automatic Expansion
Thespec.autoscaling object allows you to specify rules for automatically expanding volumes in the set. The available options are:
maxCapacity: The largest allowable size for any volume in the set.minFreePercentage: This must be a number between 1 and 100. When the free percentage on any volume drops below this threshold, Control Plane will issue anexpandVolumecommand automatically.scalingFactor: This must be a number 1. When a volume must be expanded, the new capacity will be (the minimum size to ensureminFreePercentage)scalingFactor. E.g. if a volume is using 8/10 GB, and theminFreePercentageis 50, the new capacity will be 16scalingFactor, assuming that product ismaxCapacity.
Volume Set Autoscaling
Snapshots
Snapshots can be taken at any time and (optionally) on a regular schedule. To set up automatic snapshotting, you may use thespec.snapshots object. Options include:
retentionDuration: The length of time to retain a newly created snapshot. This should be a floating point number followed by either d, h, or m (for day, hour or minute)schedule: A cron expression describing the snapshot frequency. Snapshots cannot be taken more frequently than once per hour.
File System Type
Currently supported file systems are:- ext4
- xfs
- shared
Mount Resources
For the shared file system only, you will be charged CPU and memory per mount point. Shared volumes must be mounted once per node.There will be at most one mount point per replica.
mountOptions property. e.g.
Resource Constraints
minCpuandmaxCpucan be at most 4000m apart- The ratio between
minCpuandmaxCpumust be at least 1:4 minMemoryandmaxMemorycan be at most 4096Mi apart- The ratio between
minMemoryandmaxMemorymust be at least 1:4
Performance Classes
Each volume set has a single, immutable, performance class. The performance class determines:- How many Megabytes per second can be transferred to and from the volume (MB/second)
- How many I/O operations can be processed per second. (IOPS)
- Read/write latency
Because these drives are served over the network, IOPS/throughput is limited per VM. The performance of individual drives will vary.
General-Purpose SSD
Name:general-purpose-ssd
Minimum Capacity: 10Gb
Maximum Capacity: 16384Gb
| Service Provider | Max Throughput | Max IOPS |
|---|---|---|
| AWS | 125 MB/s | 3000 |
| GCP | 1200 MB/s | 80000 |
| Azure | 125 MB/s | 3000 |
High-Throughput SSD
In general, IOPS/throughput capacity varies linearly with storage capacity. The values shown below are the maximum possible values, and may only be achievable with large volume sizes.
high-throughput-ssd
Minimum Capacity: 200Gb
Maximum Capacity: 16384Gb
| Service Provider | Max Throughput | Max IOPS |
|---|---|---|
| AWS | 400 MB/s | 4600 |
| GCP | 1200 MB/s | 100000 |
| Azure | 1200 MB/s | 15500 |
Custom Encryption (AWS)
Control Plane encrypts all volumes by default. The custom encryption feature allows you to specify your own AWS KMS keys for encrypting volumes in a volume set, giving you complete control over the encryption keys used for your data.When to Use Custom Encryption
Use custom encryption when you need to:- Meet specific compliance or regulatory requirements that mandate customer-managed keys
- Maintain control over key lifecycle management (rotation, revocation, etc.)
- Use separate encryption keys for different environments or applications
- Integrate with existing key management workflows
Custom encryption is currently only available for AWS. Support for other cloud providers is not yet available.
Prerequisites
Before configuring custom encryption, you need:- An AWS KMS key in each region where you want to use custom encryption
- Appropriate KMS key policies configured for the KMS key to allow volume encryption
Required Key Policies
Your KMS key policy must permit to Control Plane to use the key for volume encryption. The policies below grant the necessary permissions. You must add these policies to any KMS key used with Control Plan volume sets.Configuration Schema
Custom encryption is configured in the volume setspec using the customEncryption object:
customEncryption.regions: An object mapping region names to encryption configurations{cloud-provider}-{region}: The region identifier in Control Plane format (e.g.,aws-us-east-1,aws-eu-west-1)keyId: The full ARN of the AWS KMS key to use for volumes in that region
Region Naming Format
Region names must follow the format:aws-{aws-region-name}
Examples:
aws-us-east-1for US East (N. Virginia)aws-us-west-2for US West (Oregon)aws-eu-west-1for EU (Ireland)aws-ap-southeast-1for Asia Pacific (Singapore)
Complete Example
Here’s a full example of a volume set with custom encryption configured for two AWS regions:Volume Set with Custom Encryption
Important Constraints
Key Immutability- Once a volume is created with a specific KMS key, the encryption key cannot be changed
- To use a different key, you must create new volumes
- Encryption keys are configured per region, not globally
- Each region can have its own KMS key
- If a region is not specified in
customEncryption.regions, volumes in that region will use AWS default encryption
- Custom encryption only works with traditional file systems:
ext4andxfs - The
sharedfile system does not support custom encryption
- This feature is for Control Plane-managed clusters only
- For BYOK clusters you have full control over your storage classes, and therefore the encryption method as well.
Commands
Volume sets support imperative operations on individual volumes and snapshots. To issue a command, send aPOST to the volume set’s -command endpoint. e.g. POST https://api.cpln.io/org/my-org/gvc/my-gvc/volumeset/my-volume-set/-command. These commands can also be created using the Control Plane console at https://console.cpln.io
Volume Expansion
Volumes can be expanded on-demand by issuing anexpandVolume command. If the volume set is in-use by a workload, the corresponding workload replica will be restarted.
Volumes cannot be “expanded” to a smaller size.
expandVolume
Spec:- location
- volumeIndex
- newStorageCapacity
expandVolume Command
Volume Deletion
To delete a volume, issue adeleteVolume command.
deleteVolume
This command deletes the specified volume’s storage device. Note: the metadata for the volume at the specified index will not be removed from the volume set. Only your data will be deleted.Deleting an in-use volume
If the volume set is in-use by a workload, a new storage device may be immediately created. e.g. if the volume set is in-use by a workload with one replica, and you delete the volume at index 0, Control Plane will:- Create an empty volume to service the workload
- Delete the old volume as requested
- Restart the workload replica, binding it to the volume created in step 1.
deleteVolume Command
Snapshots
Each volume in a set has its own list of snapshots. You manipulate snapshots by issuing commands to the volume set.createVolumeSnapshot
Take a snapshot for a given volume (specified by location and volume index).snapshotName must be unique for the target volume.
Spec:
- location
- volumeIndex
- snapshotName
- snapshotExpirationDate
- tags
- Specify any key/value pair here.
createVolumeSnapshot Command
deleteVolumeSnapshot
Delete the specified snapshot. Spec:- location
- volumeIndex
- snapshotName
deleteVolumeSnapshot Command
restoreVolume
Restore the specified volume to one of its snapshots. If this volume set is in-use by a workload, the corresponding workload replica will restart. Spec:- location
- volumeIndex
- snapshotName
restoreVolume Command
BYOK Support
Volume sets are supported in BYOK locations as long as the following prerequisites are met:- The cluster must have a CSI-compatible storage driver installed.
-
You must create storage classes which use the CSI-compatible provisioner, with the following names:
general-purpose-ssd-ext4general-purpose-ssd-xfspremium-low-latency-ssd-ext4premium-low-latency-ssd-xfsgeneral-purpose-ssd-ext4-commandgeneral-purpose-ssd-xfs-commandpremium-low-latency-ssd-ext4-commandpremium-low-latency-ssd-xfs-command
Planned Features
- Automatic volume expansion.
Permissions
The permissions below are used to define policies together with one or more of the four principal types:| Permission | Description | Implies |
|---|---|---|
| create | Create new volumesets | |
| delete | Delete existing volumesets | |
| edit | Modify existing volumesets | view |
| exec | Execute commands | exec.restoreVolume, exec.createVolumeSnapshot, exec.expandVolume, exec.deleteVolume, exec.deleteVolumeSnapshot |
| exec.createVolumeSnapshot | Create a snapshot of a volume | |
| exec.deleteVolume | Delete a volume | |
| exec.deleteVolumeSnapshot | Delete a volume snapshot | |
| exec.expandVolume | Increase the storage capacity of a volume | |
| exec.restoreVolume | Restore a volume to a snapshot | |
| manage | Full access | create, delete, edit, exec, exec.createVolumeSnapshot, exec.deleteVolume, exec.deleteVolumeSnapshot, exec.expandVolume, exec.restoreVolume, manage, view |
| view | Read-only access |