Growing by Leaps and Bounds
Launched in November 2008, Groupon features a daily deal on the best stuff to do, see, eat, and buy in a variety of cities in over 31 countries. People looking for great deals can get Facebook or Twitter feeds, email notifications or visit the Groupon site, customized for their city, to find promotions that match their interests. And as the company name implies, daily deals are more fun when shared with friends, so members are invited to pass the savings along to get the best deal together. Groupon.com is a Ruby on Rails web application with a MySQL backend, and it utilizes Redis and resque for background jobs. It’s a remarkable example of a successful, scalable app built on open source technologies and deployed in the cloud. The pace of change is fast: the dev team deploys the application weekly and sometimes daily depending on what needs to get into it. And due to the increasing popularity of the Deal of the Day, Groupon is experiencing explosive growth.
For engineering director Shinji Kuwayama and his team of developers, this growth translates into traffic bursts on the site that on any given day can double or triple the normal traffic. In August of this year for example, the Gap partnered with Groupon on a Daily Deal, which resulted in a burst of 70,000 concurrent users. Similar deals with companies like eBay have significantly increased site traffic. “These promotions happen quickly and that’s the nature of our business model,” said Shinji. “We don’t expect to get advance notification–we just have to be ready for increased site traffic regardless of what the promotion is and when it happens.”
Watching Performance and Rooting out Potential Issues
To help the team keep an eye on the health and availability of Groupon.com, Shinji has implemented several tools including Nagios for infrastructure monitoring, Pingdom for availability monitoring, and New Relic RPM for 24×7 application monitoring. With RPM, which works just the same whether deployed in a cloud or dedicated environment, the team can get a snapshot view of application response time and throughput as well as the performance of back-end systems and external services. And no one on the team in their Chicago headquarters has an excuse to say they don’t know how the application is behaving, since the app monitoring dashboard is broadcast on several large-screen monitors throughout the office. “With around the clock monitoring in place, we get a great view of the application and can react quickly when we see a potential issue pop up,” says Shinji. When that happens, they can use the New Relic tool to quickly look at transaction types which are most affected, and drill into individual transaction to see a performance breakdown component by component. They can also drill into database calls all the way down to SQL statements and EXPLAIN plans. “The key to monitoring the app and then rapidly determining the cause of a potential issue is seeing the transaction in context,” explains Shinji. “That’s the power of having this tool in place. New Relic is a standard for Rails shops and I recommend to my whole team that they use monitoring and management tools like this to ensure site performance.”
So far the dev team has been able to use their performance management and monitoring tools to significantly increase their (and the app’s) operational efficiency. This is an important achievement not only for the health of the app, but also for the small team, which by default is practicing what a lot of folks term ‘devops.’ That is, developers are assuming the operations role and are responsible on a day-to-day basis for knowing how the production app is doing and for acting quickly when the first signs of trouble pop up. RPM plays the key role of first responder by finding sparks and pointing to the source before they become fires. The team can then quickly react and, using the tools and procedures they have put in place, take the necessary remediation steps before customers are affected.
But their work is not done. As the holidays rapidly approach, Shinji and team are gearing up for a busy season. They spent the summer optimizing the app to make sure they had everything covered: infrastructure capacity, redundancy, and effective monitoring. And while you never know what the next Daily Deal could bring, one thing’s for sure: whether its fine dining, holiday shopping or anything else, the dev team at Groupon.com is ready for it.
Join the Groupon team
And by the way, if you’ve got some Ruby chops, live in the Chicago area, and are looking to make an impact with a fast-growing company, give Shinji a shout. He is always looking for talented developers to help Groupon continue its remarkable growth.