• [AWS] 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.

  • 相关阅读:
    PowerDesigner_15连接Oracle11g,反向工程导出模型图
    angular学习
    GoEasy消息推送
    Spring 工作原理
    JAVA解析HTML,获取待定元素属性
    设计模式之工厂方法模式
    设计模式之单例模式
    通过Java代码获取系统信息
    centos7下NAT模式下设置静态ip
    关于在Spring项目中使用thymeleaf报Exception parsing document错误
  • 原文地址:https://www.cnblogs.com/Answer1215/p/14543780.html
Copyright © 2020-2023  润新知