It's Not Always Sunny in the Clouds

33 %
67 %
Information about It's Not Always Sunny in the Clouds
Technology

Published on May 7, 2009

Author: subelsky

Source: slideshare.net

Description

I discuss why I became disillusioned with cloud computing and why I ultimately came to embrace it, using the case study of OtherInbox.com

It’s not always sunny in the clouds Me, teetering Text

Mike Subelsky @subelsky

Mike Subelsky @subelsky

1 / 1 / 08 08:00:00 ET

“Everything needs to be automated”

Autoscaling is the easiest part

Think carefully about credential management

You really could use internal DNS

It's maybe not that cheap

Launching servers is not that fast

You will become dependent on “glue” services

You will become dependent on “glue” services

You will depend on a distant faceless provider

Use DVCS

You will spend a lot of time on monitoring

Your logs will runneth over

Your logs will runneth over

Write lots of “in-process tests”

Write lots of “in-process tests” m = Message.find_last_slug_message secs = m.created_at - m.date_sent if secs > 600 ErrorNotifier.fatal(quot;Missed slug deliveryquot;,secs,m) end

Snapshots are slow

Snapshots are slow

Rails will be the least of your worries

Cloud services involve subtle-yet-massive tradeos

SQS guarantees delivery at least once

SQS guarantees delivery at least once def self.guard_against_repeat_delivery(smtp_message_id) begin create!(:smtp_message_id => smtp_message_id) return true rescue ActiveRecord::StatementInvalid end

SQS guarantees delivery at least once def self.guard_against_repeat_delivery(smtp_message_id) begin create!(:smtp_message_id => smtp_message_id) return true rescue ActiveRecord::StatementInvalid rows_updated = raw_update(quot;UPDATE application_message_logs SET last_attempt_at = UTC_TIMESTAMP(), WHERE smtp_message_id = #{smtp_message_id} AND last_attempt_at < DATE_SUB(UTC_TIMESTAMP(), INTERVAL 900 SECOND)quot;) end

SQS guarantees delivery at least once def self.guard_against_repeat_delivery(smtp_message_id) begin create!(:smtp_message_id => smtp_message_id) return true rescue ActiveRecord::StatementInvalid rows_updated = raw_update(quot;UPDATE application_message_logs SET last_attempt_at = UTC_TIMESTAMP(), WHERE smtp_message_id = #{smtp_message_id} AND last_attempt_at < DATE_SUB(UTC_TIMESTAMP(), INTERVAL 900 SECOND)quot;) if rows_updated < 1 logger.warn(quot;Preventing duplicate msg delivery #{smtp_message_id}quot;) return false else return true end end

Queue lengths inaccurate for < 1000 items

SQS not necessarily FIFO

So you may not want a cloud queue

SimpleDB optimized for writes, not reads

You must code defensively

There are no good quot;cloud sandboxesquot;

Pay attention to MySQL timeouts

quot;User account management is -not- ideal.quot; -Deacon Bradley

You are locked-in to your provider

Relational DB may not be the best choice

Is there a benefit?

Changes the way you write code

You can start right away

Pretty awesome redundancy

Time for an example?

US-EAST-1C 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 US-EAST-1B 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-1C 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 X XX US-EAST-1B 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

X US-EAST-1C 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 X US-EAST-1B 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-1C X 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 US-EAST-1B X 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

X US-EAST-1C SMTP Cloud 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 US-EAST-1B X 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

Me,recovering

Questions? mike@oib.com @subelsky subelsky.com

Add a comment

Related presentations

Related pages

It's Not Always Sunny In the Clouds: Lessons Learned ...

May 7 2009 11:45AM to 12:35PM It's Not Always Sunny In the Clouds: Lessons Learned - RailsConf
Read more

It's Not Always Sunny In the Clouds: Lessons Learned ...

For all its hype, cloud computing really has introduced a potent new scaling mechanism for Rails apps, enabling your architecture to be as nimble and ...
Read more

It's Not Always Sunny In the Clouds: Lessons Learned ...

In theory, Rails’ shared-nothing architecture is ideal for cloud computing, because increasing capacity is simply a matter of adding more servers to your ...
Read more

Mike Subelsky: It's Not Always Sunny in the Clouds

At RailsConf last week I gave a talk called "It's Not Always Sunny in the Clouds" where I shared all of our lessons learned with OtherInbox and cloud ...
Read more

It's Not Always Sunny in Cloud Computing - A Look At The ...

With all of cloud computing’s benefits, there are still some inherent drawbacks and weaknesses to a cloud model’s security or design. (Photo ...
Read more

It's Always Sunny in Philadelphia - Wikipedia, the free ...

It's Always Sunny in Philadelphia (sometimes referred to as Always Sunny or ... commenting "it is smug enough to think it's breaking ground, but not ...
Read more

It's Always Sunny in Philadelphia | WEDNESDAYS | 10PM | FX ...

It’s Always Sunny in Philadelphia follows the exploits of “The Gang” who run the unsuccessful Paddy’s Pub, and love nothing more than to scheme, ...
Read more

It's Always Sunny in Philadelphia (TV Series 2005– ) - IMDb

With Charlie Day, Glenn Howerton, Rob McElhenney, Kaitlin Olson. Four young friends with big egos and slightly arrogant attitudes are the proprietors of an ...
Read more

It's Always Sunny Above the Clouds

It's Always Sunny Above the Clouds Best part of my job? Its always a sunny day at 35,000 ft. The following describes my life, it's glamour, ...
Read more