BOA high performance setup on AWS

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

Hello BOA users around the world. I would like to discuss a possible implementation of BOA in a High-Availability / High-Performance setup.

Preface:
I've been using BOA for my business infrastructure on a Linode VPS for almost a year. I've been working on a relatively large website for the past 6 months that will require some flavor of ha/ hp setup since it will serve well over 30k uniques a month and loads of video streaming.

Desired Architecture hosted on AWS
--------------------------------- Load Balancer ---------------------------------
-------------------------- WebServer -- WebServer ---------------------------
-- Memcahce / Solr -- Video Encoding Server -- File Server -- Database --

THE PLAN
Although this plan is still in my head I believe it could work. Your feedback and experience is greatly appreciated, and you can count on hearing more from me as I proceed with testing this.

  • Memcache / Solr aka HEAD= EC2 (m1.large or m1.xlarge) with full Barracuda installation. We are thinking that since this is only meant to serve one client and one website (although it will have dev versions) we wouldn't need Octopus. Please correct me if i'm wrong but to my knowledge Octopus only provides the 'satellite' instance to install multiple distros and sites for multiple clients.
  • Video Encoding Server= EC2 (c1.xlarge) with custom flavor of enterprise video encoder
  • File Server= Nothing special here, just 2tb EBS
  • Database Server= EC2 (probably m2.2xlarge) with simple MariaDB or MySQL install. I guess we could also use Amazon's RDS. We would then connect this server to HEAD (memcached / solr) via adding a database server as a node in Aegir.
  • WebServers= Here we are thinking of seriously hacking the BARRACUDA.sh script (sorry Grace!) to only install php-fpm and nginx. We would then clone the instance and add them to the HEAD by adding webserver nodes to Aegir, then creating a new webserver cluster (always in Aegir) with them.
  • Load Balancer= All this will likely go in an amazon VPN so, loadbalancer is just Amazon's Elastic Load Balancer

The desired result
Ultimately we would like to log into the Aegir instance on the Memcached / Solr server that barracuda neatly setup for us and be able to deploy our site onto the cluster of webheads and separate db from a customized Pressflow platform. From there it will also be easy to deploy development instances and hopefully will make this easy to maintain.

Thank you all (especially the BOA team), let me know what you think.
-miro

Comments

Your idea sounds great.

geofftech's picture

Your idea sounds great. However, there are a few things that jump out at me

Firstly, BOA is really designed for multiple sites. You only have a single site - maybe the Mercury/Pantheon project (http://groups.drupal.org/mercury) might be a better option. It is an optimised single site project.

Secondly, I think BOA has issues with EC2. When I tried, it failed to install (8.9). Whereas Mercury is natively EC2 based.

Having said that, a clustered Aegir/BOA solution is an excellent idea. AWS does a lot of the work for you - especially if you use Beanstalk. Would you have a webserver cluster for each "platform" or allow each webserver node to host multiple platforms?

After some trial and error I

smira's picture

After some trial and error I was able to run BOA without any problem on EC2. Just need to remember to set http_wildcard=yes and db_hostname=localhost in the barracuda settings. I have yet to work on the hacked script to install the nginx webheads.

Your Mercury suggestion would also be a viable one but i was unable to set it up at all. When i tried in the past i was unsure of what to do after deploying the instance (i didn't try that hard though). I have however used the official Panetheon during the initial development of this project (from getpantheon.com) and absolutely loved it. I might try my luck again with mercury.

Lastly, to answer your question, my idea was to use the webserver cluster. This cluster will host the platform with the production site. My hope here is to leverage Aegir's server cluster feature to keep the different webheads synched together as one.
Does that make sense?
I will continue testing this later this evening and report back my findings.
Thanks again

HA?

ensignavenger's picture

I might be misunderstanding your post, but I can't see how this would provide HA? If your DB server fails, or any other server at that level, your site (or at least parts of it) would go down. I suppose if you used Amazon RDS for the database, it would theoretically be somewhat HA. Then you could use EBS and have a somewhat HA file system (Though EBS is famously unstable). Then the site should stay up, but the encoding server might go down, or the cache/solr, which could result in major performance issues and loss of search.

I don't mean to discourage you- looks like a good start, if there is no need for true HA.

With that said, I don't really think what you need could really be called Barracuda. It looks more like your just adopting the performance tweaks that are part of Barracuda? You may want to look at Mercury again- I know they have been making good progress with it recently. If you do continue with altering Barracuda, I would be interested in hearing about how it goes. Good luck to you!

Hey ensignavenger, you are

smira's picture

Hey ensignavenger, you are right. Changed title to -> BOA high performance AWS setup
Thanks also for your observations on the instability of EBS, this is certainly something to look further into. I'm sure we will implement some kind of DB replication, and redundant backups but, as you mentioned, this isn't really meant to be a HA but a 'high performance'. I'n relatively new to this front so the two terms are still very close in my mind even if i understand the clear difference.

When it comes to Mercury, the only reason why it's not on the table, is because we wanted to use Nginx, and because development and support for BOA has been steady.
That being said, we will continue experimenting, and keep the community posted on the progress.
Thanks again,
-miro

High performance

Group notifications

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

Hot content this week