0.01% matters more than you think - AWS EC2 uptime⚡
ShatilKhan
Posted on January 20, 2024
What's a o.99?
99% might seem like a great number for Server Availability but actually boils down to 7 hours of down time per month!
That's why the 9's after the dot are important.
Did you ever think about why or how Netflix Servers Never go down? or how Facebook Servers go down for hours sometimes?
This is caused due to Server Down time but we all know that mostly. We are going to talk about Server Up Time & the role of AWS Elastic Compute Cloud service, how it works & it's role in reducing server down times , how it instantly scales up to handle high amounts of users.
And for the previous question, Netflix Operates at an Availability rate of 99.99% !
What & Why of EC2
Social Media Applications like Facebook, Tiktok or Instagram get more than 50 Million Users Every Month. But they aren't handling 50 Million users Every Single Moment. Sometimes it could spike up to more than 100 Million Users! This could instantly increase your Cloud Computing Costs a Hundred Folds. So How do you handle this instant spike? specially during Holiday seasons when everyone's on their phones sharing Terabytes of data online.
You balance things up to reduce cost.
AWS EC2 makes it so that you no longer need to use or buy new servers when there's a user spike up, instead it automatically scales up the software to meet the needs. It also stay in high availability because of the world wide AWS availability regions. So even if one region is damaged , backups from another region will instantly ring up & pull the entire system online.
You can also pick & choose the type of EC2 instances you wish to use. For example if you're hosting hardware heavy application that needs extensive GPU power you can adjust & create an EC2 instance that uses more GPU power. Or in case of analyzing large amounts of data you allocate more storage to your instance. This way you no longer have to worry about configuring your software manually & use EC2 to serve any purpose.
Now let's see how you can easily ring up an EC2 instance of your own.
Creating an EC2 Instance
- Go to AWS Console & in the search bar look for EC2
- On the side panel , click on instances
- Check the AWS Computing Service Instance & review the details
- After that click on
Instance Types
on the left panel - Search & select these 3 instance types
t3.large
c5.large
r5.large
& check them all
- Return to instances tab & copy the IPV4 address
- Paste the id in a new browser tab & you should see something similar with all the info from your instance.
- Back to instances tab , click on
connect
- You can click & review each individual section then click connect
- You will be taken to a Terminal environment, now you must carry out these code commands:
- Type the following command to provide ROOT Privilege:
sudo -i
- To change to the application directory, run:
cd ../home/ec2-user/sample_app
- To view the files in the sample_app directory, run:
ls
- To check the instance log, run:
tail -lf aws_compute_solutions.log
Make sure to add proper space & '.' / '_' in each command , as you can see I got an error for writing 'sample.app' instead of 'sample_app'
- Review the log details, press
Cntrl + C
, close the terminal window & return to your instance tab.
- In your instances tab, go to Actions > Instance Settings > Edit User Data
- Review the commands under current user data
-Return to Instances tab, click on Instance State > Stop Instance, when prompted , click 'stop'
That's pretty much it!
The complete bare bone basics of running an AWS EC2 instance. You can restart your instance by going on Instance State > Start
Review more info on the Instance Action tab.
This demo was done to show a basic idea of EC2 & how to navigate around an EC2 instance.
You can do this exercise by going to AWS Cloud Quest
Happy Coding!
Posted on January 20, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.