Elastic Compute Cloud(EC2)
When I was a child I used to visit the village market regularly. There was a small shop which used to sell samosas, chow-mins and other kind of stuffs that attract kids very easily. During the initial days the shopkeeper and his wife were the only ones working in the shop. They used to have 20 to 25 people visiting them every evening. Two people were able to serve these many people with ease.
The items were so tasty that the word spread to the neighboring villages. People from the other side of the river, that separate the market from other villages, had also started visiting the shop. The number of people visiting the shop in an evening started increasing. At one point they had almost 150 to 200 people visiting them in a single evening. The shop-owner started calling more and more people from his village to join him serving these many customers. He put in place some kind of ticketing system and start serving the customers with additional number of people he had called from his village for help.
As the days progressed, the river that flows across the areas started assuming all encompassing state. It was the peak of monsoons and the river became a moving ocean(like the mighty “Brahmaputra”) in itself. Many villages got cut off from the market, hence the number of visitors to the shop also reduced.
Now that number of customers had reduced, the shop-owner decided to release the additional people from duty.He,along with his wife started serving the reduced number of customer with ease again. He would call the people from his village again when the communication across the river is reinstated.
Well, Why this village story? How is it related to title of the article?
Let me tell you an another story. A corporate story this time. Few years back an online e-commerce site crashed while trying to serve millions of people together. Many leading newspapers in the country, many tech analysts had concluded that the company did not have strong back-end to support or accommodate that many transactions. In other term, they were not able to adjust and response to sudden increase in the traffic unlike the shop keeper in my village story did.
In more technical term the village shop was more “elastic”, as it could expand and shrink when the demand varied.
We can consider each person, serving the samosas and chow-mins,as servers. The shop was able to increase its capacity on demand using the people when needed and releasing them when the demand was over. I am sure the e-commerce company had also infused some elasticity in its architecture to grow with the demand and fall back to bare minimum resource to serve normal traffic. I don’t know whether they moved their workload to some cloud or not as being elastic doesn’t mean moving to cloud always. One can be elastic by buying more and more compute resources and maintaining a private data center. With a private data center it becomes sole responsibility of owners to maintain,secure,administer all the resources while they should have concentrate more on writing applications and increasing time to value. Also, it doesn’t ensure infinite capability to handle unprecedented loads in future.
But with clouds like AWS, one can delegate all the administrative stuffs to the cloud providers and can concentrate on bringing business values much quicker.
In AWS, one can acquire servers or compute resources on demand. One can write their own application and deploy them in a set compute resources which responses to the demand, i.e. grows or shrinks with demand.
The most fundamental infrastructure on which almost all of the compute resources depends in AWS are called “Elastic compute cloud” or EC2.
For the sake of analogies we can compare a single EC2 machine to our personal laptop machine. Like our PCs,EC2 machines also have RAM,CPU cores, Storage.
But there are many differences as well. Consider the current pandemic situation. Suppose you are running a company that provides online entertainment to people. With many people staying at home load on your application is increasing. You would like to increase RAM or Storage or computation power of you application with ease. Can you imagine buying a RAM or Disk during these days with lock-down in progress. Had you been running your application in cloud, you would have been only a single click away from increasing compute capability of you application infinitely.
Connecting back to my previous article on VPC(https://www.garudax.id/pulse/aws-vpc-beginner-hiranya-deka/)-EC2 are one of the resource type or servers that reside inside the subnets. AWS hosts the underlying physical hardware in a specified subnet inside a VPC. VPCs provide most of the security(network related) needed for the servers.AWS also exposes many user friendly APIs for users to interact with EC2. Users can create EC2 machines,increase/decrease RAMs,storage with API clicks.Users can also start/stop/restart the machines whenever requires. EC2 incurs cost only when in running state.In stopped state these machines doesn't cost anything with respect to the computation cost.
EC2 forms the backbone of the entire cloud computing infrastructure of AWS.Other services like-AWS ECS,Lambda uses EC2 someway or other under the hood.It is because of EC2 that entire cloud computing things has became more and more prevalent in the IT space today. EC2 is one of the initial service that AWS created and till today one of their most significant contribution to the world of computation.
Nice analogy, well explained.
Btw, Did you use to like those samosas..do they still sell it 🤔
I like your style..waiting for the next one 👍
This will really motivate and help people to understand technology takes inspiration from real life.
Good one!...