Single domain on multiple servers

I have a domain that needs to be distributed across multiple servers for load balancing purposes. I also have my application to let you know which server should handle certain requests.

Right. I decided to use subdomains like www1, www2, and just redirect to each server, but this is ugly.

I need a way to proxy requests and users to see only www each time, regardless of which IP server actually executes the request ...

I read the Apache proxy a bit, but I'm still confused about how such a script will deliver the page and resources such as video, without changing www.

+4
source share
1 answer

You can enter several IP addresses for each subdomain in your DNS table. If your DNS server supports it, you can rotate these records in each query to get a simple load balancer in a circle (see http://en.wikipedia.org/wiki/Round-robin_DNS )

However, a much better solution is to have a load balancer server that processes the entire request to your website. This way you can instantly add and remove web servers to / from load balance. Therefore, when you need some service on one server, you simply take it out of rotation.

Many balancing balancers also check if web servers are saved and dead servers are deleted automatically. This will significantly increase uptime.

+5
source

Source: https://habr.com/ru/post/1435851/


All Articles