How it works...

In this recipe, we created a target group for EC2 instances with the HTTP protocol. We can create an application load balancer with a target group with the HTTP or HTTPS protocol. A network load balancer needs a target group with a TCP or TLS protocol. We can also create target groups for IP addresses and AWS Lambda functions. By selecting the IP address option, we can even select public IP addresses that are outside of AWS. 

For the health check, we set the protocol to HTTP and the path to /index.html. We can override the port for a health check if needed by selecting the Override option for the port under the Advanced health check settings. We can set the time to wait for a response from instance (timeout), time between health checks (interval), number of consecutive failures before declaring an instance unhealthy (unhealthy threshold), number of consecutive successes before declaring an instance healthy (healthy threshold), and the HTTP response codes to check for success (success codes).

The target group instances will have an initial state of unused when they are created. When the target group is attached to an ELB, the status will change to initial. If the health checks pass, then the status changes to healthy. Other supported statuses include unhealthy if the health check fails, or draining if the target is being unregistered and connection draining is going on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.242.175