* Elastic Load Balancer *
- Application Load balancer (7th Layer of OSI HTTP/HTTPS)
- Network Load balancer (4th Layer of TCP/UDP/TLS)
- Classic Load balancer ( Previous Generation 4th and 7th OSI model layer HTTP/HTTPS/TCP/SSL)
- Domain Names for content on the EC2 instance served by the ELB is resolved by the internet DNS servers to the ELB DNS name and hence IP address.
- This is how traffic from the Internet is directed to the ELB front END.
- Classic load balancer service support HTTP, HTTPS, TCP, SSL.
- Protocols ports supported are 1-65535
- It support IPV4, IPV6 and dual stack.
- Application load balancer distributes incoming application traffic across multiple targets such as EC2 instance in multiple availability zone.
- An ELB listener is the process that checks for connection request.
- You can configure the protocol / port number of which is your ELB listener listen for connection request.
- Fronted listener check for traffic from client to the listener
- Backend listener are configured with protocol port to check for traffic from the ELB to the EC2 instances.
- It may take sometime for the registration of the EC2 instance under the ELB to complete.
- Registered EC2 instances are those that are defined under the ELB.
- ELB has nothing to do with the outbound traffic that is initiated generated from the registered EC2 instance destined to the internet or to any other instance within the VPC 170.10.1.1
- ELB only has to do with inbound traffic destined to the EC2 registered instance ( as the destination) and the respective return traffic.
- You start to be charged hourly ( also for partial hours) once yours ELB is active.
- If you do not want to be charged as you do not need the ELB anywhere you can delete it.
- Before you delete the ELB, it is recommended that you print Route 53 to somewhere else other than the ELB.
- Deleting the ELB does not affect, or delete the EC2 instance registered with it.
- Incase the EC2 registered instances has multiple IP address on etho ELB will route the traffic to its primary IP address.
- ELB supports IPV4 address only on a VPC.
- To ensure that the ELB service can scale ELB nodes in each Az ensure that the subnet defined for the land balancer is at least 127 in size and has at least 8 available IP address the ELB nodes can use to scale.
- For fault tolerance, it is recommended that you distributed your registered EC2 instance across multiple AZ within the VPC region.
- If possible, try to allocate same no of reg instance in each AZ.
- The ELB also monitors the health of its registered instances and ensures that its routes traffic only to healthy instances.
- A healthy instance shows as " healthy " under the ELB.
- When the ELB detach on unhealthy instance, it stops routing traffic to that instance.
- An unhealthy instance show as unhealthy under the ELB.
- By default, AWS console uses ping HTTP (port 80) for health check.
- Registered Instance must reopened with HTTP 200 ok message within the timeout period, else it will be considered as unhealthy
- AWS API uses ping TCP (Port-80) for health check.
- Response time out is 5 seconds (Range is 2-60 sec)
- Health check interval period of time between health checks.
- Period of time between health checks
- Default 30 ( Range is 5 to 300sec)
Unhealthy Threshold
- Number of consecutive failed health check that should occur before the instance is declared unhealthy range is 2-101 default.
Healthy Threshold
- Number of consecutive successful health check that must occur before the instance considers unhealthy range 2-10, Default -10.
- by default, the ELB distributes traffic evenly between the AZ it is defined in without consideration to the number of registered EC2 instances in each AZ.
Cross Zone Load balancing-
- Disabled by default
- When enabled the ELB will distributed traffic evenly between registered EC2 instance.
- If you have 7 EC2 instance in one AZ and 3 in another AZ and you enabled cross zone load balancing each registered EC2 instance will be getting around the same amount of traffic load from the ELB.
- ELB name you chose must be unique within the account.
- ELB is region specific, So all registered EC2 instance must be in same region but can be in different AZ's.
- To define your ELB in an AZ, you can select one subnet in that AZ subnet can be public or private.
- Only one subnet can be defined for the ELB in an AZ.
- If you try and select another one in the same AZ, it will replace the former one.
- If you registered instance in an AZ with ELB, but do not define a subnet in that AZ for the ELB these instances will not receive traffic from the ELB.
- ELB should always be occurred using DNS and not IP.
- Format of the public ELB DNS name of internet facing ELB.
- Format for internal ELB
internal-name 123456789 region lb.amazon.aws.com
- An ELB listener is the process that checks for connection request.
- Each network load balancer needs at least one listener to accept traffic.
- You must assign a security group to your ELB this will control traffic that can reach your ELB front end listeners.
Target Group-
- Logical grouping of target behind the load balancer.
- Targets groups can be exist independently from the load balancer.
- Target group can be associated with an autoscaling group.
- Target group can contain upto 200 targets.
Network Load Balancer-
- Web server llS
(RDP- Web llS, Web page, index html)
- Create NLB
- Target group
- Private IP (add target)