Does anyone know how to setup/configure multiple servers (running apache) to handle a single page. Like I don't know how many servers webdeveloper.com use, but could anyone tell me:
- How to setup them to handle a single url (how request could be distributed)?
- How to transfer data between those servers?
- Is it important to ensure that all data stored in each server are exactly the same? Like session, data?
Splitting the workload evenly between the two would be extremely difficult unless you have multiple static IPs and either a DNS server or DNS on one of your two web servers. However, if you have session data, I'm assuming you're using php/mysql. What you can do fairly easily, is to make one machine a web server and the other a mysql server. Then simply change your db-connect or mysql-connect or whatever your include is, from
PHP Code:
mysql_connect(localhost, root, password)
to
PHP Code:
mysql_connect('local ip of sql server', root, password
You'll need to make a few changes in your firewall and security settings, but this way one machine will handle the site and web requests, while the other handles queries. The effectiveness of this depends on your site to a point. It'll come down to overall traffic vs. queries/db traffic. But it will help to split up the workload with minimal difficulty.
Check for round robbin dns and set a remote server monitoring system to verify uptime if you set up such a system. It's a good idea to experiment on non production servers before going live. I presume data redundancy is what you're after/
Bookmarks