Results 1 to 7 of 7
  1. #1

    What do you use for high availability?

    I was thinking of taking two VPSes (which are with two different, quality providers) which serve web pages and setting them up as follows:

    - use rsync to keep the php and web content in sync
    - use MySQL replication to keep the databases in sync
    - use round-robin DNS to alias www.example.com to the two VPSes

    However, I realized that's not a great idea. If VPS #1 goes down, clients will still get its IP 50% of the time.

    Are there alternatives without getting insanely expensive? They needn't be in separate providers - could be same provider - that was just a thought.

  2. #2
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    454
    If you're willing to implement a 3rd vps, you can use something like Varnish or LVS (linux virtual server project) to load balance between your two web servers.

    If you can't implement a 3rd vps you could use Linux-HA / Heartbeat (Linux High availability) solutions to fail over your services / ip addresses between the vps'.

    The last solution would essentially be the heartbeat service running on both servers, one being the active server holding the IP address. If either service detects a failure in the other VPS, the heardbeat service would migrate the IP addresses and whatever other services you need to the formerly passive VPS.

    Slightly more complicated, but would save you money on a 3rd vps.

    The advantage of the 3rd vps is that you can load balance between the two and your capacity for traffic is higher.

    Hope this helps.
    Stack Star | Shift8 Web
    ★ Managed VPS Hosting ★ Managed Wordpress Hosting ★ Managed Dedicated Hosting ★ Web Development ★ Web Design
    Managed Wordpress Hosting Web Design Toronto

  3. #3
    Join Date
    Jan 2010
    Posts
    341
    I've been thinking about this lately, too, and what I'm testing now is a 3 VPS setup, with one acting as a controller and monitor, and the other two in a master-slave configuration.

    Only the master is "live." The slave is basically a hot-standby. It gets synced every 10 minutes, so worst case, the last 10 minutes of updates could be lost.

    I'm using mysqlhotcopy instead of mysql replication so far.

    The controller is also the master DNS server, so when it senses the master is down, it switches the DNS and fails over to the slave.

    When the old master comes back up, it becomes the new slave.

    I've got 3 test VPSs I'm testing things on right now. It's more complicated than I anticipated, but the basic concept is simple.

    I don't know any way to do this without custom scripting, though.

  4. #4
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    454
    how do you find mysqlhotcopy? personally i hate mysql replication in high availability scenarios -- i find the replication breaks way too easily.

    varnish can do really smart load balancing beyond round robin, if anyone is interested in reading more about it :

    http://www.varnish-cache.org/trac/wiki/LoadBalancing
    Stack Star | Shift8 Web
    ★ Managed VPS Hosting ★ Managed Wordpress Hosting ★ Managed Dedicated Hosting ★ Web Development ★ Web Design
    Managed Wordpress Hosting Web Design Toronto

  5. #5
    Join Date
    Jan 2010
    Posts
    341
    Quote Originally Posted by kevinnivek View Post
    how do you find mysqlhotcopy? personally i hate mysql replication in high availability scenarios -- i find the replication breaks way too easily.

    varnish can do really smart load balancing beyond round robin, if anyone is interested in reading more about it :

    http://www.varnish-cache.org/trac/wiki/LoadBalancing
    Mysqlhotcopy seems to be ok. I think it basically locks a database, and then copies all the database files, and then unlocks it. So it's as fast as the copy operation.

    I've only run it on small databases, so it runs in less than 1 second. But if it's a large database that takes awhile to copy, it's possible you could get hangs and timeouts on inserts & updates while it's locked.

    I'm using nginx, and I know it can do load balancing as well. The down side is you've got to keep the two systems in really close sync, then. I don't think 10 minute syncs would be good enough. And unless I'm missing something, you've got a new single point of failure for the node that's controlling the load balancing and proxying traffic.

  6. #6
    Next, you must choose a web hosting company to host your site for you. Hosting prices vary from $5/month on up depending on the nature of your site and the amount of traffic you expect; extremely popular sites can expect to pay for a more expensive plan, or to pay extra bandwidth charges.
    Web Hosting Talk offers well-established forums in which to discuss the quality of various web hosting providers.

  7. #7
    Join Date
    Mar 2011
    Location
    Graz, Austria
    Posts
    298
    use a patched Bind to see if the target IP is up - some services like geoscaling.com let you program own DNS scripts.

Similar Threads

  1. High availability hosting
    By dtpflug in forum Web Hosting
    Replies: 17
    Last Post: 06-14-2010, 12:55 PM
  2. Replies: 0
    Last Post: 05-05-2010, 11:47 PM
  3. High Availability Cluster
    By 8svn-k in forum Web Hosting
    Replies: 23
    Last Post: 06-17-2008, 10:09 PM
  4. Replies: 4
    Last Post: 11-30-2005, 06:26 PM
  5. High-Availability
    By ssam in forum Hosting Security and Technology
    Replies: 0
    Last Post: 08-15-2002, 10:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •