1 00:00:06,753 --> 00:00:11,329 - So now let's talk about the Amazon Elastic Block Store. 2 00:00:11,329 --> 00:00:13,192 So we've talked about a number 3 00:00:13,192 --> 00:00:15,251 of different storage solutions, 4 00:00:15,251 --> 00:00:18,031 instant stores being one of them. 5 00:00:18,031 --> 00:00:20,324 There are plenty of times when our applications 6 00:00:20,324 --> 00:00:24,645 need a lot of random IO where object storage 7 00:00:24,645 --> 00:00:27,815 into Simple Storage Service or Glacier just doesn't work. 8 00:00:27,815 --> 00:00:29,980 Instant store volumes are ephemeral. 9 00:00:29,980 --> 00:00:32,238 They don't have the durability that we need. 10 00:00:32,238 --> 00:00:35,744 So what we need is a volume that gives us 11 00:00:35,744 --> 00:00:39,762 a high degree or the ability to do random IO 12 00:00:39,762 --> 00:00:42,535 but also something that's a bit more durable, 13 00:00:42,535 --> 00:00:45,085 something that's not going to just delete itself 14 00:00:45,085 --> 00:00:47,459 if we lose our EC2 instance. 15 00:00:47,459 --> 00:00:50,668 So that is the Amazon Elastic Block Store. 16 00:00:50,668 --> 00:00:53,275 One of the really great things about this service 17 00:00:53,275 --> 00:00:57,087 is that the data or the device itself 18 00:00:57,087 --> 00:00:59,696 is independent from the instance. 19 00:00:59,696 --> 00:01:02,575 So EBS is built on a cluster of machines 20 00:01:02,575 --> 00:01:05,662 that are apart from our EC2 instance. 21 00:01:05,662 --> 00:01:08,662 They are connected over the network, 22 00:01:09,592 --> 00:01:12,775 but they are not to be confused with NAS. 23 00:01:12,775 --> 00:01:15,564 EBS is not Network Attached Storage. 24 00:01:15,564 --> 00:01:17,738 Even though the protocol and connection 25 00:01:17,738 --> 00:01:21,342 is over the network, it's not the same thing as NAS. 26 00:01:21,342 --> 00:01:24,895 EBS volumes, we will pay for the storage 27 00:01:24,895 --> 00:01:27,055 that we provision. 28 00:01:27,055 --> 00:01:30,451 So if we say that we need a one terabyte volume, 29 00:01:30,451 --> 00:01:33,131 then because we allocate that for that volume, 30 00:01:33,131 --> 00:01:34,851 we're gonna pay for that one terabyte 31 00:01:34,851 --> 00:01:36,209 regardless of the amount of data 32 00:01:36,209 --> 00:01:38,479 that's actually being written to it. 33 00:01:38,479 --> 00:01:41,306 Now, it's important to understand 34 00:01:41,306 --> 00:01:45,890 that an EBS volume will exist in a single availability zone. 35 00:01:45,890 --> 00:01:48,950 So at the time we create that volume, 36 00:01:48,950 --> 00:01:51,215 we need to make sure that we create it 37 00:01:51,215 --> 00:01:53,369 in the same availability zone 38 00:01:53,369 --> 00:01:56,439 in which we will have our EC2 instance 39 00:01:56,439 --> 00:01:58,402 that we attach the volume to. 40 00:01:58,402 --> 00:02:02,045 And yes, we can encrypt these EBS volumes. 41 00:02:02,045 --> 00:02:03,422 We can either do so 42 00:02:03,422 --> 00:02:05,484 with an operating system level encryption, 43 00:02:05,484 --> 00:02:09,859 or we can leverage the EBS built-in encryption mechanism. 44 00:02:09,859 --> 00:02:12,850 Now, I like to think of these very much 45 00:02:12,850 --> 00:02:16,433 like we think of a USB external hard drive. 46 00:02:18,226 --> 00:02:22,156 A USB hard drive I can plug into my laptop 47 00:02:22,156 --> 00:02:25,337 just like we have this EBS volume attached 48 00:02:25,337 --> 00:02:27,337 to an EC2 instance here. 49 00:02:28,193 --> 00:02:31,617 We have the ability to detach it 50 00:02:31,617 --> 00:02:34,965 and reattach it to another machine. 51 00:02:34,965 --> 00:02:36,835 I can detach it for that one 52 00:02:36,835 --> 00:02:39,017 and reattach it back to the original one 53 00:02:39,017 --> 00:02:41,229 just like you can with a USB hard drive. 54 00:02:41,229 --> 00:02:43,309 You can unplug it from one laptop 55 00:02:43,309 --> 00:02:46,101 and go and plug it into another one. 56 00:02:46,101 --> 00:02:49,018 But we can only have one EBS volume 57 00:02:50,077 --> 00:02:53,018 attached to one instance at a time. 58 00:02:53,018 --> 00:02:55,645 We can have multiple EBS volumes 59 00:02:55,645 --> 00:02:58,408 attached to one instance, but one volume 60 00:02:58,408 --> 00:03:01,303 can only be attached to one instance at a time. 61 00:03:01,303 --> 00:03:05,074 And yes, we can RAID them as well if we wanted to. 62 00:03:05,074 --> 00:03:08,191 From my experience, I've seen RAID 63 00:03:08,191 --> 00:03:10,784 not necessarily give you any better performance, 64 00:03:10,784 --> 00:03:12,957 especially RAID 5 and RAID 1. 65 00:03:12,957 --> 00:03:15,789 It's not gonna necessarily increase performance. 66 00:03:15,789 --> 00:03:18,546 You're not necessarily getting the redundancy 67 00:03:18,546 --> 00:03:22,059 because EBS is already inherently redundant to a degree. 68 00:03:22,059 --> 00:03:25,049 It's resilient to the loss of a device. 69 00:03:25,049 --> 00:03:27,591 So you already have the redundancy built-in. 70 00:03:27,591 --> 00:03:30,415 In some cases, I have seen some better performance 71 00:03:30,415 --> 00:03:34,029 using RAID 0 across multiple EBS volumes. 72 00:03:34,029 --> 00:03:37,239 And yes, you can add them to a Logical Volume Manager. 73 00:03:37,239 --> 00:03:39,600 As far as your operating system is concerned, 74 00:03:39,600 --> 00:03:42,069 it's just a volume like anything else. 75 00:03:42,069 --> 00:03:46,236 It just so happens that EBS is connected over the network. 76 00:03:47,512 --> 00:03:50,762 So, that is Amazon Elastic Block Store.