High Availability (HA) - Drupal

Events happening in the community are now at Drupal community events on www.drupal.org.
alexus's picture

We’re trying to ascertain the best way to achieve good redundancy in an enterprise-level utilization of Drupal. Ideally, We would like to have multiple instances of Drupal on different physical hosts/VMs. For instance, if we need to perform maintenance on one host/VM, the site doesn’t go down because there’s always another instance up, or in case of DOS attack, we’d have a better chance of sustaining because we’d have multiple instances running instead of one.

Have others been able to achieved something like this? Any advice, caveats or suggestions?

Comments

Use one of the Cloud solutions

yktdan's picture

They all handle most of it transparently.

This is a great video to

langworthy's picture

This is a great video to watch to see how Acquia built their HA cloud hosting http://www.archive.org/details/BuildingScalableHighPerformanceDrupalSite...

Dead link

repoman's picture

@langworthy do you have another link. This one is no longer avail. Thz

shorten link

alexus's picture

@repoman: same link but shorten http://bit.ly/gmNZq4
@langworthy: I'm not looking to do Clouds, I'm interested in doing that in-house type of scenario, besides Clouds doesn't really answer HA question, you just suggesting me to use another kind of technology.

I think the most common

dalin's picture

I think the most common configuration for multiple servers (and the one that we use in-house for our line of clustered VPSes) is:

  • 1 load balancer / firewall
  • Multiple web-heads usually running Apache (you could try an alternative, but in my experience there isn't really anything to gain). Have as many as you need, I've worked with 2-8.
  • Database master
  • Database slave, NFS server (web-heads share the Drupal files directory via NFS).

Varnish can either be your load balancer, or you can have an instance of Varnish running on each web-head for higher redundancy (but lower performance). Memcache can either go on the DB slave, or a dedicated server.

If you just want to ramp-up to that size of configuration you can

  • 1 load balancer / firewall
  • 1 web-head
  • 1 database server

You can also add multiple memcache servers as necessary, and more DB slaves.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Shared Files Dir

mikeytown2's picture

This module I created has significantly sped up our page generation times.
http://drupal.org/project/imageinfo_cache
Gains depends how media rich your site is. The more images the better your improvement.

@dalin: 1 load balancer /

alexus's picture

@dalin: 1 load balancer / firewall is already not a HA since there is one point of failure, for HA redundancy is number 1 priority. Do you know how would Varnish/Drupal(apache) work in regards to logged in users, meaning if a user logges into one Drupal and goes for a coffe brake and come back in 5-10 minutes do you think Drupal will pick up no problem?

@mikeytown2: thanks, but this is off topic

You can do more than one load

Jamie Holly's picture

You can do more than one load balancer, utilizing HAProxy/Heartbeat:

http://www.howtoforge.com/high-availability-load-balancer-haproxy-heartb...


HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.

Why do I need HAProxy? I'm

alexus's picture

Why do I need HAProxy? I'm already using Varnish and it can be configured as Load Balancing. I assume Heartbeat is for floating IP.

Yes Drupal works just fine

dalin's picture

Yes Drupal works just fine for logged in users and multiple servers. Session data is stored in the database rather than the file-system so as long as the web-head can access the database it's all fine. Varnish doesn't really apply to this question since you generally don't use it for authenticated users unless you get into some really advanced stuff using edge-side-includes.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Don't forget the role that

grape's picture

Don't forget the role that Aegir can play in making this happen. Physical infrastructure is one thing, but getting your updates done in a sane way is an entirely different game.

Check out the 2.0 RC version of pfSense for firewalls, routing and ha-proxy. I run it on a couple of old 1u machines at the perimeter and it has never let me down.

i'm talking more into

alexus's picture

i'm talking more into enterprise level, where you have separate hardware responsible for firewall, so pfSense isn't something that I'd ever use in my environment

i've seen hardware solutions

Jānis Bebrītis's picture

i've seen hardware solutions randomly lag/fail in unexpected ways and there is no way to fix them.

HA on MySQL, InnoDB

jclarke5's picture

You may want to look into SchoonerSQL from Schooner Information Technology. It's a commercially licensed HA release of MySQL, 100% compatible with MySQL 5.1 & InnoDB. SchoonerSQL is a shared-nothing cluster incorporating synchronous multi-threaded replication between the Master and the Read-only Master (Slave), 4x faster than other MySQL builds.
http://www.schoonerinfotech.com/products/schoonersql/index.php

HowTo: Scaling Drupal on Multiple Servers

VinayJoosery's picture

(disclosure: I work for Severalnines)

A number of our users are running a clustered Drupal/MySQL setup to load-balance traffic on multiple servers, and achieve High Availability.

http://www.severalnines.com/blog/scaling-drupal-multiple-servers-galera-...

The blog post goes through:
- setting up multiple web servers + HAProxy for load-balancing
- how to cluster mysql (multi-master cluster for InnoDB)
- how to set up file system clustering
- migrating data from your single instance drupal to the clustered environment

Drupal Run Book

rmjackson's picture

I'd just like to raise my hand in this old issue, to share a key old Unix Sys Adminism on the subject. High Availability on LAMP is doable, but don't do it without writing a Run Book for yourself and colleagues, all along the way.

We're not just talking git, proper code commenting, config check-ins, Network maps and tools here. Write yourself a book to tie it all together. Or, at very least, implement rigorous Confluence requirements and key areas of expertise within your team.

When you start to get older, you'll be glad you did.

http://drupalcreations.com/Drupal_HIgh_availability

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: