Issue
I am learning about aws and using ec2 instances. I am trying to understand what a volume is.
I have read from the aws site that:
An Amazon EBS volume is a durable, block-level storage device that you can attach to your instances. After you attach a volume to an instance, you can use it as you would use a physical hard drive.
Is it where things are stored when I install things like npm and node? Does it function like the harddrive o my server?
Solution
where things are stored when I install things like npm and node
- Yes, technically ebs volume is virtual storage drive which is connected to your instance through network, ( flash drive connected over network).
- Since network is involved which implicitly means there will be some latency because of data transfer through network.
- The data is persistent even if instance stops,terminates, hibernates or hardware failure.
- Since it is network drive it can be attached or detached to any other instance.
Adding to this there is another type of storage which you will find called as instance store
- You can specify instance store volumes for an instance only when you launch it. You can't detach an instance store volume from one instance and attach it to a different instance.
- it gives very high IOPS because it is directly (physically) attached to instance.
- The use case for instance store would where data changes rapidly like for cache or buffers.
- Your data will be lost if any of these events happens like The underlying disk drive fails The instance stops, instance hibernates instance terminates or drive failure.
Answered By - Jatin Mehrotra