I am new to AWS and trying to understand how load balancers route request to real servers. I have two questions:
Question 1:
Suppose I have a web application that runs on 198.1.1.1:80
. Users use www.example.com
to make a request to my application. Now after the load balancer is created on 197.5.3.5
& security groups are set up, I want requests go to the load balancer first.
Right now, by typing in www.example.com
the request will internally be routed from 197.5.3.5
to 198.1.1.1:80
. What change needs to be made in order to route www.example.com
to the load balancer server (197.5.3.5**
)? Also, how does the conversion from domain names to IP address happen? I am new to domain name resource records and DNS servers.
Question 2:
I am setting up EC2 instance, load balancer, and security group from scratch. In this case, should I associate the load balancer IP (197.5.3.5
) to www.example.com
? In this case, I also need to understand: whatt change needs to be made in order to route www.example.com
to the load balancer server (197.5.3.5
) ?