Version: , by neatbrian
Developer Last Online: Oct 2018
Version: Unknown
Rating:
Released: 01-30-2008
Last Update: Never
Installs: 0
No support by the author.
Greetings,
I've set up a geographically redundant VB with the following configuration
- One server in a data-center on the east coast running VB
- A second server server in a data-center on the west coast running VB
Each server runs its own copy of VB and its own copy of MySQL.
Database replication is done in real time using MySQL's multi-master circular replication (updates to one database are reflected in real time on the other end). This works amazingly well. Security is ensured through a back-end encrypted SSH tunnel linking the two MySQL instances together.
Site/file replication is done with rsync every 60 seconds (again, using the SSH tunnel for encryption).
Load balancing is done with a simple round-robin DNS setup. Primary DNS is on one side, secondary DNS on the other. This gives me a 50/50 load between the two servers without needing to rely on a single-point-of-failure load balancer.
Failover is accomplished by using a short TTL in the DNS (60 seconds) -- if one side disappears, the other side alters the zone file automatically to remove the failed site. When the other side comes back up, the other node is added back into the DNS rotation. This ensures the maximum "Downtime" for a user will be 60 seconds (the TTL value) if their server disappears.
So far, it's working out really well. We've really been able to handle some heavy loads with absolute EASE... but there are a couple of issues I'm worried about:
1) Temp-file cleanup becomes a bit of a nightmare since neither server can really know for sure that it's safe to wipe out a temp file that might have come from the other side.
2) Cron-based events... is it safe to run these on BOTH sides?? What will happen??
3) What about things like emails for thread-subscriptions... So far I've not heard any complaints, but are both servers going to attempt to send them out? I'm operating under the assumption that the server who accepted the post to the "subscribed thread" is responsible for launching this event... so I should be fine..
4) Anything else I'm too green to understand about VB... What do I not know about VB that could bite me later in this configuration?
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Sorry, the thread was aging and I didn't go back and read everything to detail. I never said to use round robin to do redirects (from my scan of the thread) however... it is possible, yet almost pointless.
Gets random IP form DNS server.... for SERVER B....
Server B sees the IP would be best suited for SERVER A... then does a redirect, thus leaving round robin DNS.
But, this goes back to my original point, if your goal is to serve up traffic based on IP address to a geo-closer server, then round robin is not what you want to do but just redirect, although if the will desires it, it can be done.