Scalability and Efficiency: AWS EC2 for Optimal Performance in the Cloud.

AWS Decoded, Your Ultimate Handbook for Cloud Mastery. Part-3.

·

6 min read

Scalability and Efficiency: AWS EC2 for Optimal Performance in the Cloud.

About Me:

Hey Folks! Am Vishwa, DevOps and OpenSource Enthusiast. Currently am doing LearnInPublic and BuildInPublic where I'll be documenting my entire journey on LinkedIn and Twitter to be accountable and to connect with many like-minded people to seek knowledge from them and help each other. Here, In this series, I'll delve deeper into Cloud computing, with a specific focus on AWS. This journey enables effortless learning and experimentation. My goal is to simplify complex concepts for all. Without any further delay, Let's get into Part 3 of the series that's all about the AWS EC2 Instance.

What is EC2?

- It represents Elastic Cloud Compute.

- In simpler terms, "Elastic" signifies the ability to increase resources as needed, "Cloud" refers to the AWS platform, and "Compute" means the capability to request virtual servers.

- Amazon's Elastic Compute Cloud (EC2) is a web service that offers scalable computing capacity in the cloud, enabling developers to easily scale their applications. In essence, EC2 functions as a virtual machine, representing a physical server where you can deploy your applications.

Why EC2?

- The primary objective of utilizing this service is to eliminate maintenance concerns and achieve cost efficiency.

- In practical terms, EC2 simplifies developers' lives by offering secure and scalable computing power in the cloud. Streamlining the scaling process, it seamlessly integrates with various services and operates on a pay-as-you-go model based on usage.

- By avoiding upfront hardware expenses, users can more easily launch and develop apps by using AWS EC2. This service is used to set up networking and security settings, run many virtual servers, and effectively manage storage.

Types of AWS EC2:

There are many kinds, and although AWS is always changing, these five versions are the most commonly used:

1. General Purpose,

Example: Using an EC2 general-purpose instance to host a dynamic website is a frequent real-world scenario. A balanced combination of memory, networking, and processing power is offered by the general-purpose M5 instance. Because of this, it's a good fit for managing user requests, responding to database queries, and maintaining a scalable and responsive online presence in addition to managing the many demands of a website.

2. Compute Purpose,

Example: Applying a compute-optimized EC2 instance—like the C5 instance—for rendering or scientific simulations is one example. Let's say you have a task that calls for a lot of processing power, such as completing intricate mathematical computations or producing visuals for a 3D modeling project. Because of its focus on high-performance computing, the C5 instance is a good option in these situations for effectively managing these compute-intensive workloads.

3. Memory,

Example: Hosting a sizable database is a useful use case for an EC2 instance with memory optimization, such as the R5 instance. The R5 instance's focus on memory capacity becomes useful if you have a database-intensive application that has substantial requirements for data storage and retrieval, like a content management system or data analytics platform. It enhances the overall functionality of the database-driven application by enabling the effective management of big datasets and rapid access to information that is frequently needed.

4. Storage,

Example: High-performance database applications can be used with a storage-optimized EC2 instance, such as the I3 instance, in real-world settings. Consider a scenario in which a firm must handle and manage enormous volumes of data for business intelligence or analytics. The I3 instance increases overall data processing efficiency by managing the demanding read-and-write operations associated with large-scale databases. It does this by placing a strong emphasis on local, high-speed storage.

5. Accelerated.

Example: Machine learning activities could be performed on an accelerated computing EC2 instance, such as the P3 instance, in a real-world application. For example, the P3 instance can be used by a business creating a recommendation system to quickly and effectively train sophisticated deep learning models. The P3 instance's strong GPUs speed up training, enabling quicker iterations and enhancements to the recommendation algorithm.

What is Regions then?

- Regions are essentially dispersed data centers that are located in different places.

- In the end, latency and security are the most crucial factors. It is preferable to construct servers in the same location for more security and lower latency; if we create at a different region and it is farther away, we will experience high latency concerns.

Example: Consider a scenario in which an online banking service provider needs a stable and secure infrastructure. To guarantee minimal latency and security, the organization chooses to install its servers in the same AWS region. This configuration enables strict security controls and guarantees quick client transactions and data processing, resulting in a seamless and safe online banking experience. On the other hand, higher latency caused by servers located in remote areas could impair the responsiveness and speed of financial transactions, affecting user experience and possibly posing security risks.

Let's use the AWS Management Console to create an EC2 instance so we can gain some real-world experience:

Steps:

Step 1: Log in to the AWS Management Console.

Step 2: Use the search tab to find the EC2 service. In my instance, it is shown in the list of recently used services because I recently used it.

Step 3: To initiate the process of configuring your own EC2 instance, click the "launch instance" button.

Step 3: Assign a special name to your EC2 instance.

Step 4: For your EC2 instance, select an Amazon Machine Image. In my instance, the Ubuntu Image and its free-tier design were my choices.

Step 5: It's time to choose the instance type, which is simply the amount of processing power required for our new instance.

Step 6: To access the EC2 instance, build a new key-value pair now. All that is involved is combining the public and private keys.

Step 7: After giving your key-value pair a name, press the "create key pair" button.

Step 8: To adjust network settings, click the edit button.

Step 9: To create a new subnet, click the "Create a new subnet" button. In a network, subnets are used to partition and arrange IP address space.

Step 10: Select the VPC that you wish to use for subnet creation.

Step 11: Give your newly created subnet a name.

Step 12: After providing the IP range for your subnet, click the "create subnet" option.

Step 13: To automatically create a public IP address for your EC2 instance, choose the "Auto-assign Public IP" option. To set firewall rules, click the "Create security group" option.

Step 14: Incoming security group rules (HTTP and SSH) should be provided according to your needs. It's best to attempt to avoid selecting "All Traffic" as an option. I permitted myself to use SSH because I had to use it to log into my EC2 and select the Launch Instance option.

Step 15: Kudos, everyone. You've successfully created an EC2 instance.

Step 16: To SSH into it, click the instance ID and copy the public IP address.

Step 17: Use any terminal to SSH into your EC2 instance now. It's recommended to utilize GitBash on Windows. The command to SSH is as follows.

#ssh -i "key-value-pair-name" username@public_ip
Example: ssh -i Demokey ubuntu@44.204.105.100.

Note: Go to the location where the key-value pair file was downloaded.

Guys, that's all. You have now gained practical experience and covered a lot of ground regarding AWS EC2.

Conclusion:

I appreciate everyone who has read it. I hope it was enjoyable for you to read. If you felt it was helpful, please let me know by leaving a comment, like it, and forwarding it to your friends. Next up, let's have a look at AWS VPC. Once again, thank you everyone.

Did you find this article valuable?

Support VISHWA S by becoming a sponsor. Any amount is appreciated!