ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

[AWS] EC2 - Elastic Load Balancing

2021-03-16 15:36:18  阅读:252  来源: 互联网

标签:Load load Configure AWS Balancer instances Balancing EC2


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.

(Optional) External Resources

  1. Getting started with Application Load Balancers
  2. Getting started with Network Load Balancers
  3. Tutorial: Create a Classic Load Balancer

标签:Load,load,Configure,AWS,Balancer,instances,Balancing,EC2
来源: https://www.cnblogs.com/Answer1215/p/14543780.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有