SlideShare ist ein Scribd-Unternehmen logo
1 von 50
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

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

It's Not Always Sunny in the Clouds

Hinweis der Redaktion

  1.      - so you either have to pay for RightScale, EY, Heroku, Scalr, etc.      - or you have to roll your own      - or you can install an open source project      - either way, it's going to cost you time or treasure
  2. Nine different sets of creds to manage Maybe YAML not so much
  3. some people, like Gartner, think AWS still charges too much
  4. - general AWS launch time - JRuby JVM
  5. - For us, SQS, S3, EC2
  6. You can get AWS SLAs, premium support
  7. otherwise you’re too dependent on the VCS host
  8. - Because nodes are ephemeral - We use Alertra & custom scripts & rightscale - we've written a ton of custom monitoring scrips
  9. one log file turns out to be better than many 40+ boxes, ephemeral so don’t save logs have not found a palatable alternative to splunk hoptoad FTW
  10. - use to test \"can we hit SQS a lot\", now we test \"can a message get delivered in a timely fashion end-to-end\" - show snippet
  11. but can be a lifesaver
  12. - show idempotency code example
  13. - show idempotency code example
  14. - show idempotency code example
  15. - esp if you have a task that HAS to be performed immediately - we use this for email delivery and generally is fast enough
  16. you miss a lot of awesome aggregation that RDBMs does for you
  17. - Cloud services give a lot of expected and unexpected errors - Write lots of exponential retry code
  18. - Testing is going to be difficult - Need something like Paypal test gateway - Fakeweb shows promise I’m working on something
  19. - connections for killed-off servers may hang around - lowering the timeout caused lots of issues for seemingly-unrelated pieces
  20. \"A system like Kerberos which is ideal for multi-server multi-role environments requires too much overhead to setup”
  21. - cloudkick may change this - it's bound to change
  22. - forces you to loosely couple components - affords you trade offs - you can throw more servers at a problem
  23. - very low activation energy
  24. - very low activation energy