Wednesday, October 22, 2025

AWS - EBS Vs Instance Store

 Amazon EBS (Elastic Block Store)

  • Type: Network-attached, persistent block storage.

  • Persistence: Data persists even if the EC2 instance stops, hibernates, or terminates (unless you set DeleteOnTermination=true).

  • Durability: Replicated automatically within the same AZ.

  • Performance options:

    • SSD-backed (gp3, io1, io2) → great for transactional workloads.

    • HDD-backed (st1, sc1) → for big, sequential workloads.

  • Features:

    • Snapshots to S3 (backup/restore, AMI creation).

    • Encryption at rest and in transit.

    • Resizable volumes, change type without downtime.

  • Use cases:

    • Databases, critical apps, persistent storage.


Instance Store (Ephemeral Storage)

  • Type: Physically attached NVMe or SSD disks to the EC2 host.

  • Persistence: Data is ephemeral → lost when:

    • Instance stops, hibernates, or terminates.

    • Underlying hardware fails.

  • Durability: No replication across hardware.

  • Performance: Very high IOPS and low latency (because it’s directly attached).

  • Features:

    • No snapshots, no encryption by default.

    • Size/type depends on instance family (e.g., i3, d2, m5d).

  • Use cases:

    • Cache, buffers, temporary storage, high-speed scratch data.


Key Differences (EBS vs Instance Store)

FeatureAmazon EBSInstance Store
PersistencePersists after stop/terminateData lost on stop/terminate
AttachmentNetwork-attached (can detach/attach)Physically attached to host
DurabilityReplicated in AZ (fault-tolerant)No replication, tied to hardware
ResizingCan resize, change volume typeFixed size (depends on instance)
SnapshotsSupported (S3 backup)Not supported
PerformanceHigh, but via networkExtremely high, local
EncryptionSupportedNot supported (must do at app level)
Best forDatabases, persistent workloadsCache, temp files, high-speed scratch



No comments:

Post a Comment

CI/CD - Safe DB Changes/Migrations

Safe DB Migrations means updating your database schema without breaking the running application and without downtime . In real systems (A...