[AWS] EC2 - Elastic Load Balancing

Let's have a look at how to create a load balancer, and see the configuration details for an existing load balancer.

A. Prerequisite

Go to the EC2 dashboard. In order to use elastic load balancing, you will need to make sure that you've launched the EC2 instances that you plan to register with your load balancer.

You must have more than one EC2 instance in the running state. In our example snapshot below, we have two instances, in two different availability zones (AZs).

Snapshot: Two servers, in different AZs, hosting the same application.

B. Start the Load Balancer service

On the EC2 dashboard, select the Load Balancers service from the navigation pane on left. Here, you can view the list and details of existing load balancers.

Snapshot: Load Balancers

Launch the Create Load Balancer wizard. AWS offers three types of load balancers, as shown below.

Snapshot: Three types of load balancers.

  1. Application Load Balancer (ALB)
    A simple use case: Assume you are running a microservices-architecture based application. An Application Load Balancer allows you to host the different API endpoints of your application on different servers. The load balancer then redirects the incoming HTTP/HTTP traffic to the suitable server based on the rules you specify in the configuration.

    If you choose this option, you will be taken to a six-step process:

    1. Configure Load Balancer
    2. Configure Security Settings
    3. Configure Security Groups
    4. Configure Routing
    5. Register Targets
    6. Review
  1. Network Load Balancer (NLB)
    Network Load Balancer helps to balance the load on each individual server. Having an NLB becomes essential when your application requires handling millions of requests per second securely while maintaining ultra-low latencies.

    This option has a five-step process:

    1. Configure Load Balancer
    2. Configure Security Settings
    3. Configure Routing
    4. Register Targets
    5. Review

    See an example NLB below:

Snapshot: An NLB balancing the load within a Target Group of instances

  1. Classic Load Balancer (CLB)
    It is a previous generation option. You can choose a Classic Load Balancer when you have an existing application running in the EC2-Classic network. You will have to follow a seven-step process to create a CLB:

    1. Define Load Balancer
    2. Assign Security Groups
    3. Configure Security Settings
    4. Configure Health Check
    5. Add EC2 Instances
    6. Add Tags
    7. Review

    See an example CLB below:

Snapshot: A classic load balancer

The CLB in the snapshot above is balancing the load between two of our EC2 instances: Server_1 and Server_2. If you click on the Instances tab, you're able to see the two instances that this load balancer is managing. You have the option to add or remove instances simply by clicking on Edit instances.

posted @   Zhentiw  阅读(92)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2020-03-16 【思考工具】5W2H法:集齐7个问题,让思维更缜密
2019-03-16 [Functional Programming] Build a Linear congruential generator
2016-03-16 [Javascript] lodash: memoize() to improve the profermence
2016-03-16 [AngularJS] Transforming raw JSON data to meaningful output in AngularJS
点击右上角即可分享
微信分享提示