T3 is Nginx Plus Loadbalancer
M5 is Backend Servers ( Not handled by us )
Each T3 will be connected to all Backend servers
In Nginx Upstream is created by all available backend servers
Allocating an Elastic IP Address
The first step is to allocate an Elastic IP address, which becomes the fixed IP address for your AWS NLB. (While using an Elastic IP address is optional, we strongly recommend that you do so. With a dynamic IP address, the AWS NLB might not remain reachable if you reconfigure or restart it.)
- Log in to the AWS Management Console for EC2 (https://console.aws.amazon.com/ec2/).
- In the left navigation bar, select Elastic IPs, then click either of the Allocate new address buttons.
- In the Allocate new address window that opens, click the Allocate button.
- When the message appears indicating that the request for an Elastic IP address succeeded, click the Close button.
The new Elastic IP address appears on the Elastic IPs dashboard.
Creating the AWS NLB
- In the left navigation bar, select Load Balancers, then click the Create Load Balancer button.
- In the Select load balancer type window that opens, click the Create button in the Network Load Balancer panel (the center one).
- In the Step 1: Configure Load Balancer window that opens, enter the following values:
- In the Basic Configuration section:
- Name – Name of your AWS NLB (aws-nlb-lb in this guide).
- Scheme – internet-facing.
- In the Listeners section:
- Load Balancer Protocol – TCP (the only available option).
- Load Balancer Port – Port on which your AWS NLB listens for incoming connections. In this guide, and for most web applications, it is port 80.
- In the Availability Zones section, the zones that host the EC2 instances to which your AWS NLB routes traffic. Click the radio button in the leftmost column of the appropriate row:
- In the Basic Configuration section:
- When you select an availability zone in the table, a drop‑down menu appears in the Elastic IP column. Select the address you allocated in Allocating an Elastic IP Address .
- Click the Next: Configure Routing button in the lower‑right corner of the window.
Configuring the AWS NLB Routing Options
In the Step 2: Configure Routing window that opens, you create a target group, which contains the set of EC2 instances across which your AWS NLB load balances traffic (you’ll specify those instances in Registering Instances in the Target Group ).
- In the Target group section, select or enter the following values:
- Target group – New target group
- Name – Name of the target group (for this guide, aws-nlb-tg)
- Protocol – TCP (the only available option)
- Port – The port you specified for the Load Balancer Port field in Step 3 of the previous section (80 in this guide)
- Target type – instance
- In the Health checks section, open the Advanced health check settings subsection and enter the following values:
- Protocol – Protocol the AWS NLB uses when sending health checks. This guide uses TCP, which means the AWS NLB makes a health check by attempting to open a TCP connection on the port specified in the next field.
- Port – Port on the target instances to which the AWS NLB sends health checks. In this guide, we’re selecting traffic port to send health checks to the same port as regular traffic.
- Healthy threshold – Number of consecutive health checks an unhealthy instance must pass to be considered healthy.
- Unhealthy threshold – Number of consecutive health checks a healthy instance must fail to be considered unhealthy.
- Timeout – Number of seconds the AWS NLB waits for a response to the health check before considering the instance unhealthy.
- Interval – Number of seconds between health checks.
3. If you want to use HTTP‑based health checks, select HTTP or HTTPS in the Protocol field instead of TCP. Two additional fields open (not shown in the screenshot):
- Path – The path to which the AWS NLB sends a GET request as the health check.
- Success codes – Range of HTTP response codes the AWS NLB accepts as indicating a successful health check.
4. Click the Next: Register Targets button in the lower‑right corner of the window.
Registering Instances in the Target Group
In the Step 3: Register Targets window that opens, you add instances to the empty target group you created in the previous section. For this guide, we add both of our NGINX Plus load balancer instances.
- In the Instances table, click the radio button in the left‑most column for the two NGINX Plus load balancer instances, ngx-plus-1 and nginx-plus-2.
- Click the Add to registered button above the table. The instances are added to the Registered targets table.
- Click the Next: Review button in the lower‑right corner of the window.
Launching the AWS NLB
In the Step 4: Review window that opens:
- Verify that the settings are correct. If so, click the Create button in the lower‑right corner of the window. To change settings, click the Previous button to go back to previous screens.
- The AWS NLB is provisioned. When the success message appears, click the Close button to return to the Load Balancers dashboard.
- The Load Balancers dashboard opens. As noted in the previous Load Balancer Creation Status window, it can take a few minutes to provision the AWS NLB. When the value in the State column of the table changes to active, click the radio button in the left‑most column to display details about the AWS NLB.
- To verify that the AWS NLB is working correctly, open a new browser window and navigate to the AWS NLB’s public DNS name, which appears in the DNS name field in the Basic Configuration section of the dashboard. [If you copy and paste the DNS name, be sure not to include the parenthesized words at the end, (A Record).]
The default Welcome to nginx! page indicates that the AWS NLB has successfully forwarded a request to one of the two NGINX Plus instances.
- To verify that the NGINX Plus load balancer is working correctly, Stop Nginx Service on Server and see.