> For the complete documentation index, see [llms.txt](https://gyansetu-aws.gitbook.io/aws-cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gyansetu-aws.gitbook.io/aws-cloud/practical-9.md).

# practical

1. Creating a load balancer

Create an instance (rhel) -> install httpd -> service restart

-> create index.html (any content) -> service -> add http for sg - > check it is working -> go to load balancer -> based on the load balancer you need select the load balancer -> classic load balancer -> add a name and default vpc -> select sg which support ssh and http -> configure health check -> response timeout (5 sec : time to wait when receiving a response from the health check) -> interval (amount of time between health checks) -> unhealthy threshold (2 no of consecutive health check failures before declaring an EC2 instance unhealthy, note : in 60 sec it checks 2 time since interval is 30) -> healthy threshold (no of consecutive health check successes before declaring an ec2 instance healthy) -> add the instance -> enable cross end load balancing (cross end load balancing distributes traffic evenly across all your back-end instances in all available zones) -> enable connection draining (the no.of sec to allow existing traffic to continue flowing) -> create -> wait for 1 min till it become in-service (status of instance) -> get the public dns of load balancer and paste it in the new tab e.g. dns/index.html

1. When you create a load balancer in a VPC, you must choose whether to make it an internal load balancer or an Internet- facing load balancer. The nodes of an Internet-facing load balancer have public IP addresses.
2. &#x20;The DNS name of an Internet-facing load balancer ispublicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the Internet.&#x20;
3. The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.&#x20;

* Max 20 load balancer per region.&#x20;
* Max 5 SG for load balancer.&#x20;
* Max 1 subnet for load balancer. Deleting a load balancer does not affect its EC2 instance.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gyansetu-aws.gitbook.io/aws-cloud/practical-9.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
