case studies

The Webby Awards: Excellence In Application Scalability and Performance

Hailed by the New York Times as the “Internet’s highest honor”, The Webby Awards is the leading international award honoring excellence on the Internet. Established in 1996 during the Web’s infancy, The Webbys is presented by the International Academy of Digital Arts and Sciences, an academy of Web experts from over 60 countries around the world. The Webbys presents two honors in every category—The Webby Award and The Webby People’s Voice Award. Members of the IADAS select the nominees for each category, as well as the winners of The Webby Awards. The online community determines the winners of The Webby People’s Voice Awards by voting for their favorite nominees over a two week period in April. Each year, The Webby People’s Voice Awards garners millions of votes from the Web community all over the globe.

Introduction

Area 17, an interactive agency with offices in New York and Paris, built The Webby Awards’ “People’s Voice” web application and deployed it on Engine Yard. This is a case study of the application’s deployment and performance since its public debut.

"We needed a platform that would allow us to deploy quickly, scale without downtime, and push enhancements on a regular basis without any service interruption. Engine Yard delivered on every requirement. The Engine Yard Professional Services team provided advice and support through the entire setup process and allowed us to be confident that both the application and its infrastructure were going to hold under traffic. The entire team at Engine Yard were responsive, professional and continued to prove themselves as experts in their field."

Phil Jeffs
Director of Strategy
Area 17

Requirements

Area 17 needed to deploy The People’s Voice application in such a way that it would be immediately scalable at launch. They expected a large surge of traffic at launch, and the possibility of traffic spiking rapidly and repeatedly throughout the voting period.

Solution

This led them to use Engine Yard due to the ease with which a cluster can be horizontally scaled for added throughput.

Application Stack

The People’s Voice application is a Ruby on Rails application running Ruby 1.9.3 and PostgreSQL 9.2 using ActiveRecord. The team used rspec along with rspec-rails to develop the ain standard TDD fashion. The application uses the underlying PostgreSQL database efficiently. The operations which conduct reads or writes against the database are rebuilding cache, registering votes inside a transaction and authentication. The application runs on Nginx, which forwards requests into a Unix socket where Unicorn application workers process it.

Deploying the Application

Environment setup: The People’s Voice application was first deployed to Engine Yard in a staging environment consisting of 3 High CMedium instances: application and database master instances and an Elasticsearch utility instance for search index and aggregation. This allowed Area 17 to test their deployments, future releases and custom chef recipes on Engine Yard prior to production.

From staging to production: The initial deployment into staging took approximately one hour, including data import. Shortly thereafter, Area 17 personnel stood up a production cluster, deployed the application and imported data into production. Total time to deploy: Just under two hours.

Customization with Chef: Area 17 needed access to memcached and Elasticsearch. With Engine Yard, memcached is deployed on application instances out-of-the-box. Area 17 was able to deploy Elasticsearch easily by using the ey-cloud-recipes open source repository that Engine Yard maintains.

Traffic analysis: To ensure the application would satisfy heavy loads, Area 17 utilized the Engine Yard Professional Services team to conduct a traffic throughput analysis prior to launch.

The Webby Awards “People’s Voice” web application

The Webby Awards “People’s Voice” web application

Performance and Results

The production environment for The People’s Voice application consists of five High CXL instances (64-bit): three application instances, a database master and one Elasticsearch utility instance.

  • With this setup and intelligent use of caching, the application serves 460,000 page views per day with 94,000 unique visitors (average). _New Relic reports requests per minute of 2,860 on average. Response times average between approximately 175ms to 235ms. _ Analysis of Area 17’s application and database servers shows that their Cutilization has not hit maximum utilization even once for a two-week period ending April 25, 2013.
  • We can also see that the PostgreSQL database in use is quite unencumbered and that the Elasticsearch index is also capable of serving many more requests than it is currently tasked with.

Gra1: Application master Cutilization

Application master Cutilization

  • Conceivably this cluster could, with its present configuration, serve well over double its current workload with the primary bottlenecks being Cutilization on application instances. Based on Cutilization an addition of one application instance could allow the cluster to serve theoretically at least 300% more traffic (at a six instance cluster size) since the Elasticsearch and PostgreSQL instances have additional capacity at present.

End User Engagement

  • In the previous year, The People’s Voice application was processing approximately 50,000 votes per day. This year, the application had more than 107,000 votes on day one—over a 100% increase.
  • Average votes per day this year were at 70,000, meaning there was a 40% increase in the number of votes on a production cluster of only five machines with quite a bit of room to spare.

Gra2: Database master low Cutilization due to intelligent use of caching

Database master low Cutilization due to intelligent use of caching

Gra3: Database master disk write operations are fairly minimal

Database master disk write operations are fairly minimal

Gra4: Elasticsearch instance low Cutilization

Elasticsearch instance low Cutilization

Summary

The People’s Voice application performs reliably on Engine Yard due to its intelligent use of caching and overall solid build. The application was deployed relatively quickly thanks to Area 17’s experience with the platform and clever architecture design by Engine Yard.

"I want to thank Engine Yard for our partnership this year on The Webby People’s Voice campaign. The site launch went more smoothly than it has ever gone before and remained stable throughout the campaign. We’ve historically had trouble managing the stability of the site and this year we could not have asked for more. You know you need to batten down the hatches when a @JustinBieber tweet sends 67,000 users your way—but the site didn’t even flinch thanks to you guys.

Claire Graves
Managing Director
The Webby Awards

Appendix

  1. Deployment scrisends a USR2 signal to the Unicorn master process after new code has been put in place and the release directory symlinked.
  2. The master process reloads the application under /data/<appname>/ current on the machine it’s running on. That directory happens to be a symlink that was, during the deploy process, pointed at a new directory containing new code. Unicorn reloads its master process based on the code inside this new directory without needing to be relaunched.
  3. Unicorn’s master process allows the worker processes that it’s monitoring, which were originally forks of itself, to finish requests they are presently working at the time Unicorn receives the USR2 signal.
  4. As each worker process finishes processing its active requests, it is terminated and the Unicorn master forks itself into a new process with the latest deployed code. That forked process then takes the place of the worker previously terminated and begins processing requests.
  5. The cycle is repeated for each worker until all application worker processes executing the previous code release are gone and have been replaced with new worker processes, running in parallel, on the machine as separate, forked processes from the master.
  6. Unicorn was chosen over Passenger due to the application’s need for zero-downtime deploys. The team at Area 17 production user interface changes nearly hourly.

Webby Awards

www.webbyawards.com

Industry: Media & Entertainment

Location: California, USA

Use Case: A highly scalable web application

Results: Intelligent cluster architecture allowed for 1.5 million votes and 1.3 million unique site visitors in a two week period