Amazon Elastic Load Balancing


Amazon Elastic Load Balancing - An Overview

Elastic Load Balancing (ELB) is a load-balancing service from Amazon Web Services (AWS). AWS ELB automatically distributes incoming application traffic across multiple targets, such as EC2 instances, and scales resources to meet traffic demands.  Elastic Load Balancing helps IT teams adjust capacity according to incoming application and network traffic.

AWS ELB supports three types of load balancers: Application Load Balancers, Network Load Balancers and Classic Load Balancers.

  • The Application Load Balancer handles advanced traffic routing from other services or containers at the application level.
  • The Network Load Balancer is ideal for load balancing of TCP traffic and capable of handling millions of requests per second while maintaining low latencies.

Monitoring Amazon Elastic Load Balancing - What We do

This page discusses how Applications Manager gives you the ability to monitor your Load Balancers, analyze traffic patterns and troubleshoot issues with your load balancers and targets for optimized performance.

  • Gather real-time performance data - Get basic data about the number of healthy hosts, latency, requests, error rates and more.
  • Analyze connection count statistics - Monitor the number of rejected connections to follow your Load Balancer’s ability to properly connect to a target and route a request.  Measure the number of rules and bytes processed by the Application ELB.
  • Track healthy and unhealthy host count - Monitor the number of healthy targets registered with the Application Elastic Load Balancer. Maintain a Healthy Host Count by tracking healthy instances
  • Troubleshoot and monitor target HTTP error response codes - Gather statistics on the number of Client and Server errors generated by the load balancer. Measure the number of TLS connections that could not successfully establish a session between your load balancer and its registered instances. Get an aggregate of HTTP 4XX and 5XX error codes generated by the targets in your group.
  • Detect real-time performance issues and fix them faster - Understand the scalability of your ELB system and get a jumpstart on monitoring the Load Balancers in your environment. Applications Manager provides the ability to monitor your ELB configuration with detailed metrics about the requests made to your load balancers.
  • Get instant notifications of performance issues and bottlenecks. Take quick remedial action before your end-users experience issues.

Creating a new Amazon ALB/NLB monitor

Mode of Monitoring: CloudWatch & AWS API using SDK.

Prerequisites for setting up Amazon ELB monitoring: Click here

To create a new Amazon monitor, follow the steps given below:

  1. Click on New Monitor link.
  2. Select Amazon under Cloud Apps category.
  3. Specify the Display Name of the Amazon server
  4. Choose ALB or NLB as the Amazon Service you wish to monitor.
  5. Enter the Amazon Access Key Id of the AWS for accessing the AWS through the API. The access key has 20 alpha-numeric characters.
  6. Enter the Secret Access Key of the AWS. The secret key should be 40 alpha-numeric characters long.
  7. Choose the Account Type. The default Account Type when adding a new Amazon monitor is AWS Global. Choose AWS China as the Account Type to monitor services in the AWS China regions.
  8. Specify the Polling Interval in minutes.
  9. If you are adding a new monitor from an Admin Server, select a Managed Server.
  10. Choose the Monitor Group with which you want to associate the Amazon monitor to, from the combo box (optional). You can choose multiple groups to associate your monitor.
  11. Click Add Monitor(s). This discovers the Amazon server from the network and starts monitoring it.

Use the AddMonitor API to add an ELB Monitor

Syntax

http://[Host]:[Port]/AppManager/xml/AddMonitor?apikey=[APIKEY]&type=[TYPE]&AmazonServices=[AmazonServices]&accessKey=[ACCESSKEY]&SecretAccessKey=[SECRETACCESSKEY]&displayname=[DISPLAYNAME]&AccountType=[ACCOUNTTYPE]

Request Parameters

The parameters involved in the API request are described below. Also, refer the list of common request parameters.

Field Description
type The type of the monitor you want to add. Value should be Amazon
accessKey The Access Key Id of the AWS for accessing the AWS through the API.
SecretAccessKey The secret access key of the AWS.
AccountType
  • AwsGlobal
  • AwsChina
AmazonServices The type of Amazon service. Possible values are:
  • EC2 (for Elastic Compute Cloud)
  • RDS (for Relational Database Services)
  • S3 (for S3 Buckets)
  • SNS (for Simple Notification Services)
  • DYNAMODB,EC2,RDS,S3,SNS (for multiple services)
  • ALB (for Application Load Balancer)
  • NLB (for Network Load Balancer)

Sample Request

http://localhost:9595/AppManager/xml/AddMonitor?apikey=15212eb94d705a3b0993e30709818c4e&type=Amazon&AmazonServices=ALB,NLB&accessKey=ACCESSKEYACCESSKEYAC&SecretAccessKey=SECRETACCESSKEYSECRETACCESSKEYSECRETACCE&displayname=awsrestapi&AccountType=AwsGlobal

Monitored Parameters

Go to the Monitors Category View by clicking the Monitors tab. Click on ALB or NLB in the Amazon Instances under the Cloud Apps Table. Displayed is the bulk configuration view distributed into three tabs:

  • Availability tab gives the Availability history for the past 24 hours or 30 days.
  • Performance tab gives the Health Status and events for the past 24 hours or 30 days.
  • List view enables you to perform bulk admin configurations.

Click on the monitor name to see all the Amazon ALB metrics listed under the following tabs:

Click on the monitor name to see all the Amazon NLB metrics listed under the following tabs:

Applications Load Balancer (ALB) Metrics

Applications Load Balancer - Overview

Parameter Description
AVERAGE LATENCY
Average Target Latency The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received. This is equivalent to the target_processing_time field in the access logs.
REQUESTS
Total Requests The number of requests processed over IPv4 and IPv6. This count includes only the requests with a response generated by a target of the load balancer. 
Requests / Min The requests processed per minute over IPv4 and IPv6.
CONNECTIONS
Active Connections The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets. 
New Connections The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.
Rejected Connections The number of connections that were rejected because the load balancer had reached its maximum number of connections. 
PROCESSED BYTES
Total Data Processed The total number of bytes processed by the load balancer over IPv4 and IPv6.
Data Processed/Min The bytes processed per minute by the load balancer over IPv4 and IPv6.
RULE EVALUATIONS
Rule Evaluations The number of rules processed by the load balancer given a request rate averaged over an hour.
CONSUMED LB CAPACITY UNITS
Consumed Capacity Units The number of load balancer capacity units (LCU) used by your load balancer. 

Applications Load Balancer - Errors

Parameter Description
CONNECTION ERRORS
Client TLS Negotiation Errors The number of TLS connections initiated by the client that did not establish a session with the load balancer. 
Target TLS Negotiation Errors The number of TLS connections initiated by the load balancer that did not establish a session with the target. 
Target Connection Errors The number of connections that were not successfully established with the target.
LOAD BALANCER ERRORS
ELB Client Errors The number of client errors that originate from the load balancer. 
ELB Server Errors The number of server errors that originate from the load balancer. 

Applications Load Balancer - Target Groups

Parameter Description
CONFIGURATION INFO
Target Group The name of the target group.
Port The port to use to connect with the target.
Protocol The protocol to use to connect with the target.
Target type The type of target that you must specify when registering targets with this target group.
Timeout(Seconds) The amount of time, in seconds, during which there was no response from the target.
Interval(Seconds) The approximate amount of time, in seconds, between health checks of an individual target. 
HEALTHY AND UNHEALTHY HOST
Healthy Host Count The number of targets that are considered healthy after health checks.
Unhealthy Host Count The number of targets that are considered unhealthy after health checks.
TARGET GROUP REQUESTS
Request Count The number of IPv6 requests received by the load balancer.
PERFORMANCE METRICS
Target Group The name of the target group.
Healthy Hosts The number of targets that are considered healthy after health checks.
Unhealthy Hosts The number of targets that are considered unhealthy after health checks.
Average Target Latency(Seconds) The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received. This is equivalent to the target_processing_time field in the access logs.
Total Requests The number of requests processed over IPv4 and IPv6. This count includes only the requests with a response generated by the targets in a specific target group.
Requests Per Target The average number of requests received by each target in a target group. You must specify the target group using the TargetGroup dimension. This metric does not apply if the target is a Lambda function.
ERRORS
Target Group The name of the target group.
Target Connection Errors The number of connections that were not successfully established with the target.
Target TLS Negotiation Errors The number of TLS connections initiated by the load balancer that did not establish a session with the target. 
Target HTTP 5XX Errors The number of HTTP 5XX server error codes that originate from the load balancer.
Target HTTP 4XX Errors The number of HTTP 4XX client error codes that originate from the load balancer. 
Target HTTP 3XX Errors The number of HTTP 3XX redirection codes that originate from the load balancer.
Target HTTP 2XX Errors The number of HTTP response codes generated by the targets. 

Applications Load Balancer - Targets 

Parameter Description
TARGET DETAILS
Target ID The ID of the target. If the target type of the target group is instance, specify an instance ID.
Target Group The name of the Target Group.
Port The port on which the target is listening.
Status The state of the target - initial | healthy | unhealthy | unused | draining | unavailable
Reason
  • Heatlty: If the target state is healthy, a reason code is not provided.
  • Initial: If the target state is initial, the reason code can be one of the following values:
    • Elb.RegistrationInProgress - The target is in the process of being registered with the load balancer.
    • Elb.InitialHealthChecking - The load balancer is still sending the target the minimum number of health checks required to determine its health status.
  • Unhealthy: If the target state is unhealthy, the reason code can be one of the following values:
    • Target.ResponseCodeMismatch - The health checks did not return an expected HTTP code.
    • Target.Timeout - The health check requests timed out.
    • Target.FailedHealthChecks - The health checks failed because the connection to the target timed out, the target response was malformed, or the target failed the health check for an unknown reason.
    • Elb.InternalError - The health checks failed due to an internal error.
  • Unused: If the target state is unused, the reason code can be one of the following values:
    • Target.NotRegistered - The target is not registered with the target group.
    • Target.NotInUse - The target group is not used by any load balancer or the target is in an Availability Zone that is not enabled for its load balancer.
    • Target.IpUnusable - The target IP address is reserved for use by a load balancer.
    • Target.InvalidState - The target is in the stopped or terminated state.
  • Draining: If the target state is draining, the reason code can be the following value:
    • Target.DeregistrationInProgress - The target is in the process of being deregistered and the deregistration delay period has not expired.
  • Unavailable: If the target state is unavailable, the reason code can be the following value:
    • Target.HealthCheckDisabled - Health checks are disabled for the target group.

Applications Load Balancer - Configuration

Parameter Description
CONFIGURATION DETAILS
Load Balancer ID The ID of the load balancer.
Region The AWS region in which the load balancer is configured.
State The state of the load balancer - active | provisioning | active_impaired | failed.
Type The type of load balancer -  application or  network.
DNS name The public DNS name of the load balancer.
Scheme Internet-facing OR internal. Internet-facing load balancers can route requests from clients over the internet. Internal load balancers can only route requests from clients with access to the VPC for the load balancer. 
IP address type The type of IP addresses used by the subnets for your load balancer. 
VPC ID The ID of the VPC for the load balancer.
Availability zones The Availability Zones for the load balancer.
Security groups The IDs of the security groups for the load balancer.
Creation time The date and time the load balancer was created.

Network Load Balancer Metrics

Network Load Balancer - OVERVIEW

Parameter Description
TCP CONNECTIONS
Active Connections The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets. 
New Connections The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.
TLS CONNECTIONS
Active TLS Connections The total number of concurrent TLS  connections from clients to targets.
New TLS Connections The total number of new TLS  connections established from clients to targets in the time period. 
DATA PROCESSED (TCP)
Data processed (TCP) The total number of bytes processed by the load balancer.
Data processing rate (TCP) The rate of bytes processed  per minute by the load balancer.
CONSUMED LB CAPACITY UNITS
Consumed Capacity Units The number of load balancer capacity units (LCU) used by your load balancer. You pay for the number of LCUs that you use per hour.

Network Load Balancer - ERRORS

Parameter Description
CONNECTION ERRORS
Client TLS Negotiation Errors The total number of TLS handshakes that failed during negotiation between a client and a TLS listener. 
Target TLS Negotiation Errors The total number of TLS handshakes that failed during negotiation between a TLS listener and a target. 
RESET PACKETS COUNTERS
Client Reset Packets The total number of reset (RST) packets sent from a client to a target.
Load Balancer Reset Packets The total number of reset (RST) packets generated by the load balancer.
Target Reset Packets The total number of reset (RST) packets sent from a target to a client. 

Network Load Balancer - TARGET GROUPS

Parameter Description
TARGET GROUPS DATA
Target Group The name of the target group.
Port The port to use to connect with the target.
Protocol The protocol to use to connect with the target.
Target type The type of target that you must specify when registering targets with this target group.
Timeout (seconds) The amount of time, in seconds, during which there was no response from the target.
Interval (seconds) The approximate amount of time, in seconds, between health checks of an individual target. 
Healthy Hosts The number of targets that are considered healthy. 
Unhealthy Hosts The number of targets that are considered Unhealthy.

Network Load Balancer - TARGETS

Parameter Description
TARGET DETAILS
Target ID The ID of the target. If the target type of the target group is instance, specify an instance ID.
Target Group The name of the Target Group to which the target is mapped.
Port The port on which the target is listening.
Status The state of the target - initial | healthy | unhealthy | unused | draining | unavailable
Reason
  • Healthy: If the target state is healthy, a reason code is not provided.
  • Initial: If the target state is initial, the reason code can be one of the following values:
    • Elb.RegistrationInProgress - The target is in the process of being registered with the load balancer.
    • Elb.InitialHealthChecking - The load balancer is still sending the target the minimum number of health checks required to determine its health status.
  • Unhealthy: If the target state is unhealthy, the reason code can be one of the following values:
    • Target.ResponseCodeMismatch - The health checks did not return an expected HTTP code.
    • Target.Timeout - The health check requests timed out.
    • Target.FailedHealthChecks - The health checks failed because the connection to the target timed out, the target response was malformed, or the target failed the health check for an unknown reason.
    • Elb.InternalError - The health checks failed due to an internal error.
  • Unused: If the target state is unused, the reason code can be one of the following values:
    • Target.NotRegistered - The target is not registered with the target group.
    • Target.NotInUse - The target group is not used by any load balancer or the target is in an Availability Zone that is not enabled for its load balancer.
    • Target.IpUnusable - The target IP address is reserved for use by a load balancer.
    • Target.InvalidState - The target is in the stopped or terminated state.
  • Draining: If the target state is draining, the reason code can be the following value:
    • Target.DeregistrationInProgress - The target is in the process of being deregistered and the deregistration delay period has not expired.
  • Unavailable: If the target state is unavailable, the reason code can be the following value:
    • Target.HealthCheckDisabled - Health checks are disabled for the target group.

Network Load Balancer - CONFIGURATION

Parameter Description
CONFIGURATION DETAILS
Load Balancer ID The ID of the load balancer.
Region The AWS region in which the load balancer is configured.
State The state of the load balancer - active | provisioning | active_impaired | failed.
Type The type of load balancer -  application or  network.
DNS name The public DNS name of the load balancer.
Scheme Internet-facing OR internal. Internet-facing load balancers can route requests from clients over the internet. Internal load balancers can only route requests from clients with access to the VPC for the load balancer.
IP address type The type of IP addresses used by the subnets for your load balancer.
VPC ID The ID of the VPC for the load balancer.
Availability zones The Availability Zones for the load balancer.
Creation time The date and time the load balancer was created.