We have a fairly high traffic Linux web server that will be moving VPS hosts soon.
So, I need to change the domain name to point to the new IP. As far as I know, this means some requests will be going to one server, other requests to the other server for a couple of days. All session and other state is stored in the DB.
I gather we have a few options:
- Serve the same pages on each one, and share a database. Connect the new server to the old one's database via the network until DNS has settled in, then move the DB to the new server.
- Move the database to the new server. Use iptables/Apache to proxy requests from the old server to the new one.
What is the best way to do this, to make sure that the site runs smoothly?