[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

[For AWS beginners] Easy to understand in 5 minutes! Easy-to-understand explanation of Amazon ELB!

Hello! This is Inoue, a Persian cat from Beyond Shikoku Office.

This time, I would like to explain about the [load balancer] provided by AWS!

What is [load balancer]?

A load balancer is something you often hear about, but to put it simply, it is a device that balances (distributes) the load on servers.

If there is not a lot of access and the server handles few requests, there is no problem without using a load balancer. However, suppose that for some reason access becomes concentrated on the server.

At such times, many people may have experienced that the server becomes heavy and it takes a long time to display the site.

When a server is accessed from the Internet, the server processes the request using resources such as the CPU and memory installed on that device.

If for some reason access becomes concentrated and the number of requests increases rapidly, the page may become slow to display on the web user's browser or may not be displayed at all. A high load condition occurs when request processing is delayed, such as when this page is slow to display or not displayed at all.

It can be said that the load is high due to concentrated access to the server.

A load balancer plays an active role in preventing sites from displaying too slowly or not being displayed under such high load conditions.

By distributing the load across multiple servers, you can prevent the load from concentrating on one server.

The load balancer mechanism not only concentrates web access, but also provides stable services to web users even in the event of a server failure.

The load on the server cannot always be said to be constant. Therefore, in order to always provide stable services to users, it is necessary to introduce a load balancer.

What is [ELB]?

ELB is an abbreviation for [Elastic Load Balancing] and is a load balancer provided by AWS.

As mentioned above, a load balancer is a mechanism that distributes the access (traffic) concentrated on a server to multiple servers or networks to distribute the load. It is also called a "load balancer" because it distributes a single load.

In addition to load balancing, it also has a health check function. The health check feature allows you to monitor server performance in real time.

This allows you to stop sending traffic to an abnormal server when it is found, and send traffic to other healthy servers for load balancing.

ELB automatically distributes the load and prevents servers from going down.

Furthermore, ELBs automatically scale according to load conditions, so administrators (engineers) do not have to manually increase the number of ELBs or raise their specs.

If you anticipate a sudden increase in traffic, such as a sudden increase in access, you can also use it in conjunction with AWS Auto Scaling. This allows you to increase or decrease the number of servers according to the amount of requests, and prevent server downtime.

Additionally, as a feature of ELB, it is possible to load balance the traffic of installed EC2 even if the availability zones are different.

We recommend that you enable multiple Availability Zones for all your load balancers.
However, your Application Load Balancer requires at least two Availability Zones to be enabled.
This configuration allows your load balancer to continue routing traffic.
If one Availability Zone becomes unavailable or there are no healthy targets, your load balancer can route traffic to healthy targets in another Availability Zone.

Reference site: How ELB works

■Types of ELB
There are three types of ELB: ALB, NLB, and CLB.

ALB Abbreviation for [Application Load Balancer].
Load balancer suitable for HTTP and HTTPS.
It operates at the application layer in the OSI reference model.
A single load balancer with enhanced support for HTTP and HTTPS protocols.
It is the most used load balancer for web applications.
Since the judgment is made by looking at the contents of commands such as request commands, it is also possible to sort by destination URL directory.
You can also encrypt communication between your instances and your load balancer.
It is also possible to specify an IP address as the distribution destination.
N.L.B. Abbreviation for [Network Load Balancer].
It operates on the transport layer (the layer responsible for controlling transmitted data) in the OSI reference model.
Since it only looks at fragmented data called packets, it cannot sort as finely as ALB.
Instead, you can set a static IP address as the distribution destination, or you can set the IP address of the client accessing the server to be directly transmitted to the server.
NLB is a modern load balancer designed to handle millions of requests per second while maintaining high throughput with ultra-low latency.
NLB routes traffic to targets within a VPC and can handle millions of requests per second while maintaining low latency.
Therefore, it is suitable for servers that are expected to receive a large amount of access (load increases rapidly).
C.L.B. Abbreviation for [Classic Load Balancer].
Among ELBs, it is an old type of load balancer.
The feature is that it supports many protocols.
It supports many protocols such as TCP, SSL/TLS, HTTP, and HTTPS.
It provides basic load balancing across multiple EC2 instances and operates at both the request and connection level.
It is intended for applications built within an EC2-Classic network.
The weakness of this load balancer is that it does not allow complex settings, and its use is currently not recommended by AWS.

In addition to the three typical AWS ELBs mentioned above, there is also [GLB].

GLB is an abbreviation for [Gateway Load Balancer].

Gateway Load Balancer allows you to easily deploy, scale, and run third-party virtual network appliances.
Gateway Load Balancer, which provides load balancing and auto scaling for a fleet of third-party appliances, is transparent to the source and destination of traffic.
This feature makes it ideal for working with third-party appliances for security, network analysis, and other use cases.

Reference site: Elastic Load Balancing

It's a service that has just been released, so I'd like to write a separate blog after studying it!

By the way, when I tested ALB to write this blog, I found that
if I just linked the ALB to the verification instance, a "403" status code was returned when I checked the access log.

172.31.4.72 - - [15/Jun/2021:07:59:03 +0000] "GET / HTTP/1.1" 403 4897 "-" "ELB-HealthChecker/2.0"

In that case, I placed an "index.html" file under the document root, put the words "aws test" in the file, and when I accessed it from a browser, a "200" status code was returned successfully.
*This requires that apache be installed on the server.

First, move to the document root.

[root@ip-172-31-38-25 httpd]# cd /var/www/html

Create a file called "index.html".

[root@ip-172-31-38-25 html]# touch index.html

Write "aws test" in the "index.html" file you created.

[root@ip-172-31-38-25 html]# vi index.html

If you want to access the verification instance from your browser, you can do so by entering [Public IPv4 address] in the chrome search bar.

Let's check the access log again!

172.31.4.72 - - [15/Jun/2021:08:38:35 +0000] "GET / HTTP/1.1" 200 9 "-" "ELB-HealthChecker/2.0"

The status code has now become ``200'' and when you check the ``Target Group'' from the AWS console, the status of the ``Target Group'' has also changed from Unhealthy to Healthy!

summary

For example, a load balancer is

“This is your job.” “I want you to do this job.”

It is like a boss (control tower) in a company.

By using a load balancer wisely, you can prevent server downtime and eliminate problems such as site display delays and ``site not displaying,'' which will likely increase trust in your site.

I also want to become a person who can work as a load balancer.

Growing every day, moving forward every day.
I have to update myself every day! ! !
Thank you for reading to the end.

If you found this article helpful , please give it a like!
6
Loading...
6 votes, average: 1.00 / 16
22,656
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

The person who wrote this article

About the author

Akika Inoue

Belongs to the System Solutions Department.
He joined Beyond as a founding member of the Shikoku office.
I jumped into the IT industry with no experience. As an education team, we create curriculum and conduct training for new graduates, mid-career, and existing members.
The main business is server operation and maintenance.
Either way, we value your content.
Also belongs to the Web Content Division and YouTube Team.