Deployment and Provisioning
In this group of lectures we run a hands on deployment of the next iteration of the Pizza Time solution. The Pizza Time business has been a success. It needs to support more customers and wants to expand to meet a global market.
We define our new solution, then walk through a hands on deployment that extends our scalability, availability and fault tolerance.
Hi and welcome to this lecture.
In this lecture, we'll talk about managing EC2 data. An instance store provides temporary block-level storage for your instance but you probably know that. Instance store is a way to have access to the physical hard drive of an instance. Instead of using an EBS volume that will be network attached, you will be using the physical hard drive and that's very fast, much faster than using EBS.
We already know that EBS is persistent and instance store is not. You might wonder why would you use instance store. You should take a look at this graph because if you take a look at the Max IOPS/Instance, you see that no matter what type of EBS volume you choose, you can never overcome 48,000 IOPS. If you need more than 48,000 IOPS per instance, you should use instance store. When using instance store, you should worry about keeping your data safe because if the Availability Zone where your instance is launched goes down, you lose your data. If the instance have a problem and you need to stop it or terminate it, you lose your data. It's a concern. You need to take care of your data.
One way to take care of your data is to save the data in your instance store disk to S3. That can be something useful for smaller disks but you might end up having problems with your replication. You can use, for example, the AWS CLI with the AWS S3 command to sync your data, but maybe your application will not work so well with these two and you will have consistency problems and you have to find a way to save your data and overcome these consistency problems. You can also use a different approach, kind of a hybrid approach. You can have your instance store disks running your production application and you can copy the files in the instance store disks to a single EBS volume or multiple EBS volumes, but the sync between these disks, you have to be deployed by you. You have to choose a tool like rsync or if you are using Windows, you can configure the FSR to do this replication.
We know when we were talking about data replication between two disks, we have still consistency problems. You can take snapshots from your instance store disks and store these snapshots in your EBS volumes. Windows has something called shadow copies. You can do that and store the shadow copies in a different volume. That's also possible. You have tons of third-party tools to create snapshots of our disk and save it in another disk. You have multiple options to back up your data to an EBS volume. In case you need to restore that, the only thing that you need to do is launch a new instance, take this EBS volume and copy the data from the EBS volume to the instance store storage and start running your application again, but that will be very time-consuming to deploy.
My point in here is if you need to use instance store, you have to create a backup solution by yourself.
About the Author
Eric Magalhães has a strong background as a Systems Engineer for both Windows and Linux systems and, currently, work as a DevOps Consultant for Embratel. Lazy by nature, he is passionate about automation and anything that can make his job painless, thus his interest in topics like coding, configuration management, containers, CI/CD and cloud computing went from a hobby to an obsession. Currently, he holds multiple AWS certifications and, as a DevOps Consultant, helps clients to understand and implement the DevOps culture in their environments, besides that, he play a key role in the company developing pieces of automation using tools such as Ansible, Chef, Packer, Jenkins and Docker.