- So now let's talk about the Amazon Elastic Block Store.
So we've talked about a number
of different storage solutions,
instant stores being one of them.
There are plenty of times when our applications
need a lot of random IO where object storage
into Simple Storage Service or Glacier just doesn't work.
Instant store volumes are ephemeral.
They don't have the durability that we need.
So what we need is a volume that gives us
a high degree or the ability to do random IO
but also something that's a bit more durable,
something that's not going to just delete itself
if we lose our EC2 instance.
So that is the Amazon Elastic Block Store.
One of the really great things about this service
is that the data or the device itself
is independent from the instance.
So EBS is built on a cluster of machines
that are apart from our EC2 instance.
They are connected over the network,
but they are not to be confused with NAS.
EBS is not Network Attached Storage.
Even though the protocol and connection
is over the network, it's not the same thing as NAS.
EBS volumes, we will pay for the storage
that we provision.
So if we say that we need a one terabyte volume,
then because we allocate that for that volume,
we're gonna pay for that one terabyte
regardless of the amount of data
that's actually being written to it.
Now, it's important to understand
that an EBS volume will exist in a single availability zone.
So at the time we create that volume,
we need to make sure that we create it
in the same availability zone
in which we will have our EC2 instance
that we attach the volume to.
And yes, we can encrypt these EBS volumes.
We can either do so
with an operating system level encryption,
or we can leverage the EBS built-in encryption mechanism.
Now, I like to think of these very much
like we think of a USB external hard drive.
A USB hard drive I can plug into my laptop
just like we have this EBS volume attached
to an EC2 instance here.
We have the ability to detach it
and reattach it to another machine.
I can detach it for that one
and reattach it back to the original one
just like you can with a USB hard drive.
You can unplug it from one laptop
and go and plug it into another one.
But we can only have one EBS volume
attached to one instance at a time.
We can have multiple EBS volumes
attached to one instance, but one volume
can only be attached to one instance at a time.
And yes, we can RAID them as well if we wanted to.
From my experience, I've seen RAID
not necessarily give you any better performance,
especially RAID 5 and RAID 1.
It's not gonna necessarily increase performance.
You're not necessarily getting the redundancy
because EBS is already inherently redundant to a degree.
It's resilient to the loss of a device.
So you already have the redundancy built-in.
In some cases, I have seen some better performance
using RAID 0 across multiple EBS volumes.
And yes, you can add them to a Logical Volume Manager.
As far as your operating system is concerned,
it's just a volume like anything else.
It just so happens that EBS is connected over the network.
So, that is Amazon Elastic Block Store.