SlideShare uma empresa Scribd logo
1 de 66
Baixar para ler offline
4/20/2013
Abusing the Cloud
for Fun
& Profit
CoderFaire Atlanta Alan Pinstein, Founder & CTO, TourBuzz
http://www.tourbuzz.net
http://www.showcaseIDX.com
@apinstein
apinstein@mac.com
What is the cloud?
What is the cloud?
Utility Computing
✤ Bare Metal
✤ Dedicated Server
✤ VM/Shared Hosting
✤ SaaS / Software-as-a-Service
✤ PaaS / Platform-as-a-Service
?
Know your place in the Stack
✤ Heroku vs EC2
Know your place in the Stack
✤ Heroku vs EC2
✤ Don’t try to devops your sysadmin if you
aren’t a sysadmin
Know your place in the Stack
✤ Heroku vs EC2
✤ Don’t try to devops your sysadmin if you
aren’t a sysadmin
✤ Move down the stack only as soon as
needed
Monetary Considerations
http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
Monetary Considerations
✤ No up-front capital costs
http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
Monetary Considerations
✤ No up-front capital costs
✤ But, more expensive cost per
unit-of-work
http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
Monetary Considerations
✤ No up-front capital costs
✤ But, more expensive cost per
unit-of-work
✤ Matches Cost To Usage, not
Capacity
http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
Monetary Considerations
✤ No up-front capital costs
✤ But, more expensive cost per
unit-of-work
✤ Matches Cost To Usage, not
Capacity
✤ Lots of things are metered that
you aren’t used to - “what gets
measured gets managed”
http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
Monetary Considerations
✤ No up-front capital costs
✤ But, more expensive cost per
unit-of-work
✤ Matches Cost To Usage, not
Capacity
✤ Lots of things are metered that
you aren’t used to - “what gets
measured gets managed”
✤ Potential lower TCO
http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
FreeTier FTW
✤ Heroku: 1 free web worker
https://www.heroku.com/pricing
✤ Mandrill: SMTP SaaS up to 12k/mo
http://mandrill.com/pricing/
✤ AWS: Free Tier
http://aws.amazon.com/free/
You cannot do this on your own.
Performance Characteristics
✤ You must understand your app’s
performance characteristics
Performance Characteristics
✤ You must understand your app’s
performance characteristics
✤ You must understand the performance
characteristics of your cloud resource
Performance Characteristics
✤ You must understand your app’s
performance characteristics
✤ You must understand the performance
characteristics of your cloud resource
✤ If they don’t match, and you have
problems...
I TOLD YOU SO.
AWS/EBSVolatility
http://www.stratalux.com/2012/08/09/putting-amazon’s-provisioned-iops-to-the-test/
Opaque stack: performance tuning is hard
✤ Used to dedicated hardware? Get ready for shared VM
performance volatility!
Opaque stack: performance tuning is hard
✤ Used to dedicated hardware? Get ready for shared VM
performance volatility!
✤ No idea what resource limits you’re given
Opaque stack: performance tuning is hard
✤ Used to dedicated hardware? Get ready for shared VM
performance volatility!
✤ No idea what resource limits you’re given
✤ Often support is hard to get or cagy about how stuff
works
Opaque stack: performance tuning is hard
✤ Used to dedicated hardware? Get ready for shared VM
performance volatility!
✤ No idea what resource limits you’re given
✤ Often support is hard to get or cagy about how stuff
works
✤ Documentation is typically not very detailed
Opaque stack: performance tuning is hard
✤ Used to dedicated hardware? Get ready for shared VM
performance volatility!
✤ No idea what resource limits you’re given
✤ Often support is hard to get or cagy about how stuff
works
✤ Documentation is typically not very detailed
✤ See: RapGenius v Heroku
✤ September 18th:
Dedicated (Xen) to AWS/EC2
✤ December 10th:
m1.xlarge > c1.medium
✤ March 3rd:
Offload image processing to
autoscaling Heroku app
Should it AutoScale?
Should it AutoScale?
✤ Volatile load (minutes/hours/days)
Should it AutoScale?
✤ Volatile load (minutes/hours/days)
✤ Volatile load (months/years)
Should it AutoScale?
✤ Volatile load (minutes/hours/days)
✤ Volatile load (months/years)
✤ Scaling up vs Scaling down
Should it AutoScale?
✤ Volatile load (minutes/hours/days)
✤ Volatile load (months/years)
✤ Scaling up vs Scaling down
✤ Cost
Should it AutoScale?
✤ Volatile load (minutes/hours/days)
✤ Volatile load (months/years)
✤ Scaling up vs Scaling down
✤ Cost
✤ Performance
Will it AutoScale?
Will it AutoScale?
✤ Decouple independent processes
Will it AutoScale?
✤ Decouple independent processes
✤ Inter-app communication must be robust
Design for Failure, and Nothing will Fail.
Using the Cloud Successfully means
Changing the way you build apps
Using the Cloud Successfully means
Changing the way you build apps
✤ Automate everything. You will start from scratch frequently.
Using the Cloud Successfully means
Changing the way you build apps
✤ Automate everything. You will start from scratch frequently.
✤ DBA, sysadmin. Implies people doing manual work.
Using the Cloud Successfully means
Changing the way you build apps
✤ Automate everything. You will start from scratch frequently.
✤ DBA, sysadmin. Implies people doing manual work.
✤ DEVOPS is sustainable, but requires expertise.
Using the Cloud Successfully means
Changing the way you build apps
✤ Automate everything. You will start from scratch frequently.
✤ DBA, sysadmin. Implies people doing manual work.
✤ DEVOPS is sustainable, but requires expertise.
✤ Programmable infrastructure
Using the Cloud Successfully means
Changing the way you build apps
✤ Automate everything. You will start from scratch frequently.
✤ DBA, sysadmin. Implies people doing manual work.
✤ DEVOPS is sustainable, but requires expertise.
✤ Programmable infrastructure
✤ Not just for the data center (vagrant)
** go to Nic’s talk later today **
Using the Cloud Successfully means
Changing the way you build apps
✤ Automate everything. You will start from scratch frequently.
✤ DBA, sysadmin. Implies people doing manual work.
✤ DEVOPS is sustainable, but requires expertise.
✤ Programmable infrastructure
✤ Not just for the data center (vagrant)
** go to Nic’s talk later today **
✤ Automation is FREEDOM.
Using the Cloud Successfully means
Changing the way you build apps
✤ Automate everything. You will start from scratch frequently.
✤ DBA, sysadmin. Implies people doing manual work.
✤ DEVOPS is sustainable, but requires expertise.
✤ Programmable infrastructure
✤ Not just for the data center (vagrant)
** go to Nic’s talk later today **
✤ Automation is FREEDOM.
✤ From vendor lock-in, employee turnover,
cost of starting from scratch
Tales from the cloud...
Arg.
x1000
Arg.
✤ CDN --> many reports of serving
partial content.
x1000
Arg.
✤ CDN --> many reports of serving
partial content.
✤ Debugging real problems with
vendors is hard.
x1000
Arg.
✤ CDN --> many reports of serving
partial content.
✤ Debugging real problems with
vendors is hard.
✤ We had to revert.
x1000
WTF.
$ heroku ps:scale workers=20
WTF.
$ heroku ps:scale workers=20
WTF.
$ heroku ps:scale workers=20
WTF.
$ heroku ps:scale workers=20
$ heroku ps:scale workers=10
WTF.
$ heroku ps:scale workers=20
$ heroku ps:scale workers=10
WTF.
$ heroku ps:scale workers=20
$ heroku ps:scale workers=10
WTF.
$ heroku ps:scale workers=20
$ heroku ps:scale workers=10
#fail
WTF!
# mac laptop
~ $ time cat /dev/random | head -c 10000K > /dev/
null
real 1.03s
user 0.00s
sys 1.01s
WTF!
# heroku
~ $ time cat /dev/random | head -c 100 > /dev/null
real 0m8.430s
user 0m0.020s
sys 0m0.000s
# mac laptop
~ $ time cat /dev/random | head -c 10000K > /dev/
null
real 1.03s
user 0.00s
sys 1.01s
WTF!
# heroku
~ $ time cat /dev/random | head -c 100 > /dev/null
real 0m8.430s
user 0m0.020s
sys 0m0.000s
# mac laptop
~ $ time cat /dev/random | head -c 10000K > /dev/
null
real 1.03s
user 0.00s
sys 1.01s
✤ Heroku has very little entropy
✤ Caused sleep & usleep to be “lazy”; use nanosleep instead.
WTF?!
$ s3cmd put file.jpg s3://mybucket/file.jpg
=> 200 OK
$ curl http://mybucket/file.jpg
=> 404 file not found
$ sleep 5 && curl http://mybucket/file.jpg
=> 200 OK
Eventually consistent....
Stuff that went right
✤ Increased application performance
✤ Sleep better at night
✤ Save a lot of money
✤ Clear path for scaling as we grow that should avoid hair-on-fire
emergencies
✤ FREEDOM: options and flexibility
Plan your trip in the cloud
✤ “Design for failure, and nothing will fail”
Plan your trip in the cloud
✤ “Design for failure, and nothing will fail”
✤ Choose vendors carefully
Plan your trip in the cloud
✤ “Design for failure, and nothing will fail”
✤ Choose vendors carefully
✤ Expectations - from your team and vendors
Plan your trip in the cloud
✤ “Design for failure, and nothing will fail”
✤ Choose vendors carefully
✤ Expectations - from your team and vendors
✤ Architecture
Plan your trip in the cloud
✤ “Design for failure, and nothing will fail”
✤ Choose vendors carefully
✤ Expectations - from your team and vendors
✤ Architecture
✤ Contingency plans
We are hiring!
Q & A
Alan Pinstein
@apinstein
apinstein@mac.com
http://www.tourbuzz.net
http://www.showcaseIDX.com

Mais conteúdo relacionado

Mais procurados

Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"
Chris Mills
 
DrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEF
DrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEFDrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEF
DrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEF
ccmcnerdy
 
Drop your website load times down a waterfall final 1
Drop your website load times down a waterfall final 1Drop your website load times down a waterfall final 1
Drop your website load times down a waterfall final 1
Jeff Costa
 

Mais procurados (20)

Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"
 
DrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEF
DrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEFDrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEF
DrupalCamp LA 2012: COOK UP SOME STACKS OF DRUPAL GOODNESS WITH CHEF
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
Web versus Native: round 1!
Web versus Native: round 1!Web versus Native: round 1!
Web versus Native: round 1!
 
A frame beginner lesson
A frame beginner lessonA frame beginner lesson
A frame beginner lesson
 
AWS Customer Presentation - SchoolofEverything
AWS Customer Presentation - SchoolofEverythingAWS Customer Presentation - SchoolofEverything
AWS Customer Presentation - SchoolofEverything
 
Immutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWSImmutable servers with Packer/Chef/AWS
Immutable servers with Packer/Chef/AWS
 
Drop your website load times down a waterfall final 1
Drop your website load times down a waterfall final 1Drop your website load times down a waterfall final 1
Drop your website load times down a waterfall final 1
 
A-Frame: VR for Web Developers
A-Frame: VR for Web DevelopersA-Frame: VR for Web Developers
A-Frame: VR for Web Developers
 
3 tips to make your Wordpress site faster
3 tips to make your Wordpress site faster3 tips to make your Wordpress site faster
3 tips to make your Wordpress site faster
 
Drupalcon 2009 Flash and Drupal
Drupalcon 2009 Flash and DrupalDrupalcon 2009 Flash and Drupal
Drupalcon 2009 Flash and Drupal
 
Copass + Ruby on Rails = <3 - From Simplicity to Complexity
Copass + Ruby on Rails = <3 - From Simplicity to ComplexityCopass + Ruby on Rails = <3 - From Simplicity to Complexity
Copass + Ruby on Rails = <3 - From Simplicity to Complexity
 
Faster web pages
Faster web pagesFaster web pages
Faster web pages
 
Build the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-FrameBuild the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-Frame
 
Introduction to A-Frame
Introduction to A-FrameIntroduction to A-Frame
Introduction to A-Frame
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small Teams
 
You ain't gonna need write a GenServer - Ulisses Almeida | Elixir Club Ukraine
You ain't gonna need write a GenServer - Ulisses Almeida  | Elixir Club UkraineYou ain't gonna need write a GenServer - Ulisses Almeida  | Elixir Club Ukraine
You ain't gonna need write a GenServer - Ulisses Almeida | Elixir Club Ukraine
 
Getting Started with Web VR
Getting Started with Web VR Getting Started with Web VR
Getting Started with Web VR
 
2nd AMIMOTO: WordPress + Amazon Web Services Singapore
2nd AMIMOTO: WordPress + Amazon Web Services Singapore2nd AMIMOTO: WordPress + Amazon Web Services Singapore
2nd AMIMOTO: WordPress + Amazon Web Services Singapore
 
What happens after react?
What happens after react?What happens after react?
What happens after react?
 

Destaque

Destaque (6)

Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...
Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...
Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...
 
Precise kilometer calculation by underground cable fault detector
Precise kilometer calculation by underground cable fault detectorPrecise kilometer calculation by underground cable fault detector
Precise kilometer calculation by underground cable fault detector
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Semelhante a Abusing the Cloud for Fun and Profit

Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
Ross Lawley
 
All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...
JAXLondon_Conference
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
Eric Bottard
 

Semelhante a Abusing the Cloud for Fun and Profit (20)

Virtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandVirtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On Demand
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
 
A real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloudA real-life account of moving 100% to a public cloud
A real-life account of moving 100% to a public cloud
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Engine
 
Practical Cloud & Workflow Orchestration
Practical Cloud & Workflow OrchestrationPractical Cloud & Workflow Orchestration
Practical Cloud & Workflow Orchestration
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up Scaling a Rails Application from the Bottom Up
Scaling a Rails Application from the Bottom Up
 
2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire2019 StartIT - Boosting your performance with Blackfire
2019 StartIT - Boosting your performance with Blackfire
 
Angular js mobile jsday 2014 - Verona 14 may
Angular js mobile   jsday 2014 - Verona 14 mayAngular js mobile   jsday 2014 - Verona 14 may
Angular js mobile jsday 2014 - Verona 14 may
 
IMC Summit 2016 Breakout - Aleksandar Seovic - The Illusion of Statelessness
IMC Summit 2016 Breakout - Aleksandar Seovic - The Illusion of StatelessnessIMC Summit 2016 Breakout - Aleksandar Seovic - The Illusion of Statelessness
IMC Summit 2016 Breakout - Aleksandar Seovic - The Illusion of Statelessness
 
Offline of web applications
Offline of web applicationsOffline of web applications
Offline of web applications
 
Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014
 
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...Switching SaaS Hosting From dedicated virtual machines to container-based clu...
Switching SaaS Hosting From dedicated virtual machines to container-based clu...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Cloud Economics
Cloud EconomicsCloud Economics
Cloud Economics
 
Enterprise Hosting
Enterprise HostingEnterprise Hosting
Enterprise Hosting
 
All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...
 
Serverless in production, an experience report (IWOMM)
Serverless in production, an experience report (IWOMM)Serverless in production, an experience report (IWOMM)
Serverless in production, an experience report (IWOMM)
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
Dev Ops without the Ops
Dev Ops without the OpsDev Ops without the Ops
Dev Ops without the Ops
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Abusing the Cloud for Fun and Profit

  • 1. 4/20/2013 Abusing the Cloud for Fun & Profit CoderFaire Atlanta Alan Pinstein, Founder & CTO, TourBuzz http://www.tourbuzz.net http://www.showcaseIDX.com @apinstein apinstein@mac.com
  • 2. What is the cloud?
  • 3. What is the cloud?
  • 4. Utility Computing ✤ Bare Metal ✤ Dedicated Server ✤ VM/Shared Hosting ✤ SaaS / Software-as-a-Service ✤ PaaS / Platform-as-a-Service ?
  • 5. Know your place in the Stack ✤ Heroku vs EC2
  • 6. Know your place in the Stack ✤ Heroku vs EC2 ✤ Don’t try to devops your sysadmin if you aren’t a sysadmin
  • 7. Know your place in the Stack ✤ Heroku vs EC2 ✤ Don’t try to devops your sysadmin if you aren’t a sysadmin ✤ Move down the stack only as soon as needed
  • 9. Monetary Considerations ✤ No up-front capital costs http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
  • 10. Monetary Considerations ✤ No up-front capital costs ✤ But, more expensive cost per unit-of-work http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
  • 11. Monetary Considerations ✤ No up-front capital costs ✤ But, more expensive cost per unit-of-work ✤ Matches Cost To Usage, not Capacity http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
  • 12. Monetary Considerations ✤ No up-front capital costs ✤ But, more expensive cost per unit-of-work ✤ Matches Cost To Usage, not Capacity ✤ Lots of things are metered that you aren’t used to - “what gets measured gets managed” http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
  • 13. Monetary Considerations ✤ No up-front capital costs ✤ But, more expensive cost per unit-of-work ✤ Matches Cost To Usage, not Capacity ✤ Lots of things are metered that you aren’t used to - “what gets measured gets managed” ✤ Potential lower TCO http://readwrite.com/2011/01/02/how-to-save-money-by-migrating
  • 14. FreeTier FTW ✤ Heroku: 1 free web worker https://www.heroku.com/pricing ✤ Mandrill: SMTP SaaS up to 12k/mo http://mandrill.com/pricing/ ✤ AWS: Free Tier http://aws.amazon.com/free/
  • 15. You cannot do this on your own.
  • 16. Performance Characteristics ✤ You must understand your app’s performance characteristics
  • 17. Performance Characteristics ✤ You must understand your app’s performance characteristics ✤ You must understand the performance characteristics of your cloud resource
  • 18. Performance Characteristics ✤ You must understand your app’s performance characteristics ✤ You must understand the performance characteristics of your cloud resource ✤ If they don’t match, and you have problems... I TOLD YOU SO.
  • 20. Opaque stack: performance tuning is hard ✤ Used to dedicated hardware? Get ready for shared VM performance volatility!
  • 21. Opaque stack: performance tuning is hard ✤ Used to dedicated hardware? Get ready for shared VM performance volatility! ✤ No idea what resource limits you’re given
  • 22. Opaque stack: performance tuning is hard ✤ Used to dedicated hardware? Get ready for shared VM performance volatility! ✤ No idea what resource limits you’re given ✤ Often support is hard to get or cagy about how stuff works
  • 23. Opaque stack: performance tuning is hard ✤ Used to dedicated hardware? Get ready for shared VM performance volatility! ✤ No idea what resource limits you’re given ✤ Often support is hard to get or cagy about how stuff works ✤ Documentation is typically not very detailed
  • 24. Opaque stack: performance tuning is hard ✤ Used to dedicated hardware? Get ready for shared VM performance volatility! ✤ No idea what resource limits you’re given ✤ Often support is hard to get or cagy about how stuff works ✤ Documentation is typically not very detailed ✤ See: RapGenius v Heroku
  • 25. ✤ September 18th: Dedicated (Xen) to AWS/EC2 ✤ December 10th: m1.xlarge > c1.medium ✤ March 3rd: Offload image processing to autoscaling Heroku app
  • 27. Should it AutoScale? ✤ Volatile load (minutes/hours/days)
  • 28. Should it AutoScale? ✤ Volatile load (minutes/hours/days) ✤ Volatile load (months/years)
  • 29. Should it AutoScale? ✤ Volatile load (minutes/hours/days) ✤ Volatile load (months/years) ✤ Scaling up vs Scaling down
  • 30. Should it AutoScale? ✤ Volatile load (minutes/hours/days) ✤ Volatile load (months/years) ✤ Scaling up vs Scaling down ✤ Cost
  • 31. Should it AutoScale? ✤ Volatile load (minutes/hours/days) ✤ Volatile load (months/years) ✤ Scaling up vs Scaling down ✤ Cost ✤ Performance
  • 33. Will it AutoScale? ✤ Decouple independent processes
  • 34. Will it AutoScale? ✤ Decouple independent processes ✤ Inter-app communication must be robust Design for Failure, and Nothing will Fail.
  • 35. Using the Cloud Successfully means Changing the way you build apps
  • 36. Using the Cloud Successfully means Changing the way you build apps ✤ Automate everything. You will start from scratch frequently.
  • 37. Using the Cloud Successfully means Changing the way you build apps ✤ Automate everything. You will start from scratch frequently. ✤ DBA, sysadmin. Implies people doing manual work.
  • 38. Using the Cloud Successfully means Changing the way you build apps ✤ Automate everything. You will start from scratch frequently. ✤ DBA, sysadmin. Implies people doing manual work. ✤ DEVOPS is sustainable, but requires expertise.
  • 39. Using the Cloud Successfully means Changing the way you build apps ✤ Automate everything. You will start from scratch frequently. ✤ DBA, sysadmin. Implies people doing manual work. ✤ DEVOPS is sustainable, but requires expertise. ✤ Programmable infrastructure
  • 40. Using the Cloud Successfully means Changing the way you build apps ✤ Automate everything. You will start from scratch frequently. ✤ DBA, sysadmin. Implies people doing manual work. ✤ DEVOPS is sustainable, but requires expertise. ✤ Programmable infrastructure ✤ Not just for the data center (vagrant) ** go to Nic’s talk later today **
  • 41. Using the Cloud Successfully means Changing the way you build apps ✤ Automate everything. You will start from scratch frequently. ✤ DBA, sysadmin. Implies people doing manual work. ✤ DEVOPS is sustainable, but requires expertise. ✤ Programmable infrastructure ✤ Not just for the data center (vagrant) ** go to Nic’s talk later today ** ✤ Automation is FREEDOM.
  • 42. Using the Cloud Successfully means Changing the way you build apps ✤ Automate everything. You will start from scratch frequently. ✤ DBA, sysadmin. Implies people doing manual work. ✤ DEVOPS is sustainable, but requires expertise. ✤ Programmable infrastructure ✤ Not just for the data center (vagrant) ** go to Nic’s talk later today ** ✤ Automation is FREEDOM. ✤ From vendor lock-in, employee turnover, cost of starting from scratch
  • 43. Tales from the cloud...
  • 45. Arg. ✤ CDN --> many reports of serving partial content. x1000
  • 46. Arg. ✤ CDN --> many reports of serving partial content. ✤ Debugging real problems with vendors is hard. x1000
  • 47. Arg. ✤ CDN --> many reports of serving partial content. ✤ Debugging real problems with vendors is hard. ✤ We had to revert. x1000
  • 51. WTF. $ heroku ps:scale workers=20 $ heroku ps:scale workers=10
  • 52. WTF. $ heroku ps:scale workers=20 $ heroku ps:scale workers=10
  • 53. WTF. $ heroku ps:scale workers=20 $ heroku ps:scale workers=10
  • 54. WTF. $ heroku ps:scale workers=20 $ heroku ps:scale workers=10 #fail
  • 55. WTF! # mac laptop ~ $ time cat /dev/random | head -c 10000K > /dev/ null real 1.03s user 0.00s sys 1.01s
  • 56. WTF! # heroku ~ $ time cat /dev/random | head -c 100 > /dev/null real 0m8.430s user 0m0.020s sys 0m0.000s # mac laptop ~ $ time cat /dev/random | head -c 10000K > /dev/ null real 1.03s user 0.00s sys 1.01s
  • 57. WTF! # heroku ~ $ time cat /dev/random | head -c 100 > /dev/null real 0m8.430s user 0m0.020s sys 0m0.000s # mac laptop ~ $ time cat /dev/random | head -c 10000K > /dev/ null real 1.03s user 0.00s sys 1.01s ✤ Heroku has very little entropy ✤ Caused sleep & usleep to be “lazy”; use nanosleep instead.
  • 58. WTF?! $ s3cmd put file.jpg s3://mybucket/file.jpg => 200 OK $ curl http://mybucket/file.jpg => 404 file not found $ sleep 5 && curl http://mybucket/file.jpg => 200 OK Eventually consistent....
  • 59. Stuff that went right ✤ Increased application performance ✤ Sleep better at night ✤ Save a lot of money ✤ Clear path for scaling as we grow that should avoid hair-on-fire emergencies ✤ FREEDOM: options and flexibility
  • 60. Plan your trip in the cloud ✤ “Design for failure, and nothing will fail”
  • 61. Plan your trip in the cloud ✤ “Design for failure, and nothing will fail” ✤ Choose vendors carefully
  • 62. Plan your trip in the cloud ✤ “Design for failure, and nothing will fail” ✤ Choose vendors carefully ✤ Expectations - from your team and vendors
  • 63. Plan your trip in the cloud ✤ “Design for failure, and nothing will fail” ✤ Choose vendors carefully ✤ Expectations - from your team and vendors ✤ Architecture
  • 64. Plan your trip in the cloud ✤ “Design for failure, and nothing will fail” ✤ Choose vendors carefully ✤ Expectations - from your team and vendors ✤ Architecture ✤ Contingency plans
  • 66. Q & A Alan Pinstein @apinstein apinstein@mac.com http://www.tourbuzz.net http://www.showcaseIDX.com