Skip to main content

Skillber v1.0 is here!

Learn more

Block Storage

Checking access...

Block storage provides raw, formatted storage volumes that attach to virtual machines. Unlike object storage (accessed via HTTP API), block storage appears as a device — /dev/xvda on Linux or E: on Windows — and is typically formatted with a filesystem.

Provider Comparison

FeatureAWS EBSAzure Managed DisksGCP Persistent Disks
Max volume size64 TB32 TB64 TB
Max IOPS per volume260,000 (io2 Block Express)160,000 (Ultra Disk)100,000 (pd-extreme)
Max throughput7,500 MB/s2,000 MB/s1,200 MB/s
Snapshot capabilityIncremental to S3Incremental to Blob StorageIncremental to Cloud Storage
Multi-attachio1/io2 (read/write for cluster)Shared disks (read/write)Read-only

SSD vs. HDD

Block storage volumes come in two families:

SSD-backed

TypeUse CaseMax IOPSMax Throughput
gp3 (AWS)General purpose, boot volumes16,0001,000 MB/s
io2 (AWS)Critical database workloads260,0007,500 MB/s
pd-ssd (GCP)General purpose30,000400 MB/s
pd-extreme (GCP)High-performance databases100,0001,200 MB/s

HDD-backed

TypeUse CaseMax IOPSMax Throughput
st1 (AWS)Streaming, big data, log processing500500 MB/s
sc1 (AWS)Cold data, infrequent access250250 MB/s

Tip

For boot volumes, gp3 (AWS) or pd-ssd (GCP) provide excellent performance at low cost. Do not use HDD-backed volumes for operating system disks — boot performance will be poor.

EBS vs. Instance Store

AWS EC2 offers two types of block storage:

AttributeEBS (Elastic Block Store)Instance Store
PersistenceSurvives instance stop/terminationEphemeral — lost on stop/termination
PerformanceNetwork-attached, variablePhysically attached to the host, maximum performance
BackupSnapshots, replicationMust be managed externally
Use casePersistent data, databasesTemporary data, caches, scratch space

Caution

Never store irreplaceable data on instance store volumes. If the instance stops, fails, or is terminated, all data on instance store volumes is permanently lost.

Encryption

Block storage encryption protects data at rest:

  • AWS EBS: Enable EBS encryption by default. Use KMS keys (customer-managed or AWS-managed).
  • Azure Managed Disks: SSE with platform-managed or customer-managed keys.
  • GCP Persistent Disks: Default encryption with CMEK or CSEK options.

Encryption is transparent to the instance — data is decrypted on read with no performance impact.

Snapshots and Backup

Snapshots capture the state of a block storage volume at a point in time:

  • Incremental: Only changed blocks are stored after the initial snapshot.
  • Cross-region: Copy snapshots to another region for disaster recovery.
  • Automated: Use AWS Backup, Azure Backup, or scheduled snapshots.

Restoring from a snapshot: Create a new volume from the snapshot. The volume is fully usable immediately, with background restoration of data blocks (lazy loading).

Choosing Between Object and Block Storage

CriteriaObject Storage (S3)Block Storage (EBS)
Access patternHTTP APIFilesystem mount
Performance~100-500 MB/s per partitionUp to 260,000 IOPS per volume
Max single file size5 TBVolume size limit
Concurrent accessMultiple readers/writersSingle instance (except multi-attach)
Cost~$0.023/GB/month (Standard)~$0.08/GB/month (gp3)
Use caseStatic assets, backups, data lakesOperating systems, databases, apps

Practical Example: Web Application Architecture

┌─────────────────────┐
│ Elastic Load Balancer │
└─────────┬───────────┘
┌─────────▼───────────┐
│ EC2 (web/app tier) │
│ Boot volume: gp3 │
│ 50 GB, 3000 IOPS │
└─────────┬───────────┘
┌─────────▼───────────┐
│ RDS (database tier) │
│ io2 volume: 500 GB │
│ 10,000 IOPS │
└─────────────────────┘

The web/application servers use gp3 volumes — cost-effective with good performance for general workloads. The database uses io2 volumes with provisioned IOPS for consistent, predictable performance. Daily snapshots of the database volume enable point-in-time recovery.