Scaling Rails Applications In The Cloud

100 %
0 %
Information about Scaling Rails Applications In The Cloud
Technology

Published on March 15, 2009

Author: subelsky

Source: slideshare.net

Description

Mike Subelsky from OtherInbox.com describes how OtherInbox uses cloud computing to scale their Ruby on Rails application.

Scaling Rails Applications in the Cloud 100 new users in < 2 hours The hashtag for this talk is: #SX09-573

A Typical Case Study 32 The Inevitable Mass Adoption of Our Product Public Beta 8 Techcrunch50 Me, Josh, Friends & Family and a 4 Private Beta few other people The Inexorable March of Time

I’m Mike Subelsky @subelsky / @otherinbox

What is Cloud Computing?

Solving problems across a flexible grid of nodes

...which you consume as a utility

The nodes are elastic

The nodes are loosely coupled Tasking System Computing Computing Computing Computing Instance Instance Instance Instance Permanent Storage

The nodes are distributed

The nodes are ephemeral

The nodes are disposable

What are the benefits?

Lower cost Greater efficiency Greater flexibility

You want flexibility

My Cloud Grows With Me! 32 Heady, Viral, Asymptomtotic Growth of Userbase Public Beta 8 Techcrunch50 Me, Josh, Friends & Family and a 4 Private Beta few other people The Blink of an Eye

What are the costs?

Some loss of control Potential for lock-in Greater complexity

You chose a language that sublimates complexity

aws-S3 RightAWS Ruby/EventMachine Ruby Shines Here Hpricot memcache-client ActiveSupport

Capistrano Chef Rubber PoolParty Scalr Roll Your Own

What do you need to get started?

Tasking System Computing Computing Computing Computing Instance Instance Instance Instance Permanent Storage Bonus: Non-RDBMS

Our Sky SMTP Sync Staging Staging Staging Staging Staging Staging Processing Master DB Staging Staging Staging Staging Staging Experiment Workers Web

Web Cloud Mongrels & Memcached JSON Mongrels & HTML Apache HAProxy Master DB Memcached Atom Mongrels & Memcached Message Bodies Mailbox Export Requests, Domain Registration SQS S3

Staging & Experiments

Sync Cloud

Autoscaling

SMTP Cloud o et Ta SQS m s na e kin e Fil ars g S3 P Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3

Loose Coupling Is How I Sleep At Night US-EAST-1C to Ta e SQS am skin en e Fil ars g S3 P Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3 US-EAST-1B to Ta me SQS s na e kin ile rs g 3 F Pa S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3

Loose Coupling Is How I Sleep At Night US-EAST-1C to Ta me SQS s na e kin ile rs g 3 F Pa S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3 X XX US-EAST-1B o t Ta me SQS s a kin en e Fil ars g 3P S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3

Loose Coupling Is How I Sleep At Night X US-EAST-1C to Ta me SQS s na e kin ile rs g 3 F Pa S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3 X US-EAST-1B o t Ta me SQS s a kin en e Fil ars g 3P S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3

Loose Coupling Is How I Sleep At Night X US-EAST-1C to Ta me SQS s na e kin ile rs g 3 F Pa S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3 X US-EAST-1B o t Ta me SQS s a kin en e Fil ars g 3P S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3

Loose Coupling Is How I Sleep At Night X US-EAST-1C to Ta me SQS s na e kin ile rs g 3 F Pa S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3 X US-EAST-1B o t Ta me SQS s a kin en e Fil ars g 3P S Postfix MailSender MailReceiver MailParser Master DB le Ra Fi w Mb x bo ox M Fil w e Ra S3

Loose Coupling Is How I Sleep At Night

What It Looks Like

Processing Cloud MessageParser h s pu cks Tasks MessageParsing Queue a allb e MessageClassfier Queue MessageClassifier c rd nam o AnyFeatureWeWant Queue ec file R ive S3 ct A AnyFeatureWorker Message Created

Workers • MessageExporter • DailyUpdateSender • RegistrationWorker • BackupWorker

The Database Is a Single Point of Failure

How We Cope Hourly EBS Volume Snapshots Weekly Master DB Dumps Expensive Queries Memcached

A Dark But Illustrative Tale with QuickTime

Manual Stuff mkdir /vol mount /vol /dev/sdj sudo god start mysqld

Manual Stuff change database.yml by hand (yuck) queue mail to redeliver

(Wasted) Troubleshooting: 15 mins

Provisioning new database: 15 mins

If there was a next time...

(standard programmer optimism applies) < 10 minutes

Replication? Sharding?

Key-Value? Columns?

Logging gem Splunk Logging Good ol’ fashion tail

Zenoss Hoptoad Slow query log Dash Monitoring RightScale Alertra New Relic

Questions? mike@oib.com @subelsky @otherinbox

Join our team Upgrade your job Open Positions • Smart, fun people • Ruby on Rails Developer • Startup environment • Ruby on Rails Intern • Cutting edge tech • Product Manager • Competitive pay • Stock options We pay $1,000 for successful referrals!

rate.sxsw.com

Thank you!

Add a comment

Related presentations

Related pages

Mike Subelsky: Scaling Rails in the Cloud With Audio and Video

At SXSW Interactive I gave a talk called "Scaling Rails in the Cloud", ... Scaling Rails Applications In The Cloud. ... a somewhat different application ...
Read more

Scaling Rails in the Cloud - RubyFlow

Slides and audio from my SXSWi 2009 talk about scaling a Rails application using cloud computing. Surprise, there was very little about Rails that caused ...
Read more

How To Scale Ruby on Rails Applications Across Multiple ...

In this DigitalOcean article we are going to see how to simply scale Ruby on Rails applications ... Rails Applications Across Multiple Droplets ... scaling ...
Read more

Scaling Brands in the Cloud - LTech - Connecting Business ...

Scaling Brands in the Cloud ... because the web application was not built for high ... Ruby on Rails code to ensure that it was designed in a truly scalable
Read more

5 Tips to Scale Your Ruby on Rails Application

5 Tips to Scale Your Ruby on Rails Application There are lots ... but it simplifies scaling. ... Legacy Apps in the Cloud.
Read more

Scaling Ruby on Rails: Setting Up A Dedicated MySQL Server ...

Ruby on Rails application development framework provides a large array of support for database servers. For a majority of applications, a relational ...
Read more

Cloud Computing and Ruby: Interviewing Hampton Catlin

Why are cloud computing and Ruby on Rails a ... about scaling. Are there certain applications you ... Computing and Ruby: Interviewing Hampton ...
Read more

Scaling your Ruby on Rails application with cloud ...

Scaling your Ruby on Rails application with cloud computing : Heroku case study
Read more

Scaling Ruby on Rails: Practical Advice - Dice Insights

Scaling Ruby on Rails: ... to buy a whole new server or up your cloud ... pieces of scaling is to avoid hitting your application tools if you ...
Read more