How to manage server load

There are a huge number of cloud server providers in the market who provide 99.9% uptime and 24*7*365 support. So deciding on IT-infra is a challenging task. There are many factors we keep in mind when we choose the right server such as cost, availability, flexibility, stability, security, and redundancy of the system.

Let’s take an example of a server environment.

Scenario

I work as a system engineer in the company named example Pvt ltd. I have been assigned a task to change traditional IT-infra into modern hi-tech infra. I get one mentor cum boss who guides me in the project and we will discuss the idea which I will be going to implement on the It- Infra.

Steps 1: Discuss with the developers what is the running application on the server and calculate how much CPU, RAM, and storage is needed for front-end and back-end servers. In large infrastructure, redundancy plays an important role.

Step 2: In the market, many tools are available for drawing an IT-infra diagram. It also plays an important role in creating an overview and analyzing all the aspects of your model.

Step -3: First of all, we choose AWS services to create a frontend in the EC2 machine and deploy all application codes. We will create a back-end on AWS RDS and copy endpoint for pointing the front-end server to the backend server.

Step -4: We will create an autoscaling and load balancer and configure it according to our needs.

Step - 5: We will check the URL example.com. If all URLs are working on the website, then we will make an image of the Ec2 server.

Step -6: On the navigation pane under Instances, choose to create and launch templates. Under autoscaling, select Ec2 to provide guidance to help create a template to use with Amazon EC2 Auto Scaling. url:-https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html

Step -7: On the navigation pane, under LOAD BALANCING, choose Load Balancers. Choose to Create Load Balancer- Select load balancer type, choose Application Load Balancer, For Load Balancer name, type a name for your load balancer. For Create LB inside, select the same network that you selected for your instances a specific VPC and Security Group

Configure security settings When you use HTTPS or SSL for your front-end listener, you must deploy an SSL certificate on your load balancer. The load balancer uses the certificate to terminate the connection and then decrypt requests from clients before sending them to the instances.

Configure Health Check- Elastic Load Balancing automatically checks the health of the registered EC2 instances for your load balancer. If Elastic Load Balancing finds an unhealthy instance, it stops sending traffic to the instance and reroutes traffic to the healthy instances. For more information about configuring health checks, see Configure health checks for your ApplicationLoadBalancer.

Register EC2 instances with your load balancer Your load balancer distributes traffic between the instances that are registered to it. You can select EC2 instances in a single Availability Zone or multiple Availability Zones within the same Region as the load balancer

Helpful link:-https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html

Time to summarize our tasks

We will create a launch template with the help of the Ec2 image and attach it with an autoload balancer. When the webserver will get a request of more than the defined threshold limit then autoscaling will create one more new instance and route the traffic in a round-robin manner.
On the backend side, we can choose the Rds instance size according to our needs(maximum number of connections at a time depends upon instance size). we will configure Rds with the Multi-AZ failover option and enable deletion protection for accidental deletion.

Helpful link -https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html

Stress Testing: We will use the Curl cmd and Jemeter tool with different parameters.
For Monitoring: We will be using Load balancer Moritring where we can easily find the latency and request count. In target groups, we can find healthy and unhealthy host counts.
In Backend, we will use an Rds monitoring graph (Cloudwatch), where we will easily identify the Cpu utilization, DB count, Write IOPS, Read IOPS, and free memory.

Where we blog our bits of technology knowledge to help other developers learn from our experiences.

Recommended from Medium

Azure Functions running on a Docker Container

Developing Axentro Blockchain

Google is pushing the new language Logica to solve the major flaws in SQL!

A Simplified Guide to Kotlin Coroutines

Best Udemy Courses for Web Development 🚀

Web Development With HHVM and Hack 8: Loops

The TezEdge node — the 6-times faster and more stable Merkle tree storage prevents the loss of…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Md Amir Hasan

Md Amir Hasan

More from Medium

Docker and Containerization

How to Setup Multiple Domains in Dedicated Hosting — Using Nginx and Docker Way

Docker for Ubuntu

How to upgrade Ubuntu by using CLI