Just do it!


Published on

Charles Teague, CEO of leading iPhone weight-loss app maker LoseIt!, shares his secrets for building and running high-volume applications in the cloud.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Consolidate this not to be a time, but to just summarize Include screen shot of android version Also need volume details 15,000 rpms 24x7 Load 1+m users of Loseit.com Small team (4 people)
  • 2 extreme approaches to a quality web service Reduce the probability of a defect in production to nearly zero Reduce the cost of fixing a defect in production to nearly zero
  • - Keep in mind that if you choose a tailored black box, your application architecture will risk being bound up /designed for that type of black box, making portability challenging.
  • Your application architecture should be designed anticipating these needs. It will be much harder to ‘bail out’ a poorly architected application…
  • For MySQL, use big instances with huge RAM. Configure big caches to protect you from slow I/O You might think that this will only speed up reads, but it has a huge impact upon write performance Spend time doing standard app & query optimization Design application / data storage to support sharding There is a limit to scaling vertically so be prepared to go horizontal Make sure app server tier is cluster safe Our servers are extremely stateless, making round robin load balancing trivial Use queuing to decouple work from main application Allow you to scale work independently Make sure queue processing servers can be clustered too!
  • Other potential info to include:   What does PaaS lets us do that we couldn’t do before   What features of a PaaS are/were most important to us   What do we wish we could do? Or what will we try to implement next?   What is the true value of a PaaS? What benefits have we received from implementing one?  
  • Just do it!

    1. 1. Just Do It! Building and running high volume applications in the cloud Charles Teague CEO, FitNow, Inc.
    2. 2. What is Lose It? <ul><li>Free mobile application, website </li></ul><ul><ul><li>Calorie tracking </li></ul></ul><ul><ul><li>Peer support using social networking </li></ul></ul><ul><li>Lose It! by the numbers </li></ul><ul><ul><li>7+ million downloads </li></ul></ul><ul><ul><li>1m+ Loseit.com users </li></ul></ul><ul><ul><li>15,000 requests per minute, 24x7 load </li></ul></ul><ul><ul><li>4 people working full time at Lose It! </li></ul></ul><ul><li>Helped users lose more than 5.5 million pounds since 2009 </li></ul>
    3. 3. What does that have to do with the cloud?! <ul><li>Lose It! started as a local only mobile application </li></ul><ul><li>Need for additional capabilities drove need for web service </li></ul><ul><ul><li>Client -> web sync support </li></ul></ul><ul><ul><li>Social features </li></ul></ul><ul><ul><li>Web version of Lose It! </li></ul></ul><ul><li>Unpredictable initial demand and usage growth made it difficult to estimate scale </li></ul><ul><li>Millions of users made high volume likely </li></ul><ul><li>As a startup, our team is small </li></ul>
    4. 4. Our challenge was to build and run a service that supports millions of users with very limited resources…
    5. 5. How can we do this? <ul><li>Use the cloud and platform as a service to make development, deployment, and operation of our service faster and easier.* </li></ul>LEVERAGE
    6. 6. Leverage the cloud <ul><li>Low startup cost </li></ul><ul><li>Ability to scale in response to anticipated demand </li></ul><ul><li>Efficiently onboard new services and capabilities </li></ul><ul><li>Choose deep, best of breed services that represent significantly more technology and expertise than we’d be able to create ourselves. </li></ul><ul><ul><li>Use of cloud eliminates need for us to focus on deployment, management, and administration of compute, disk, and other lower level infrastructure </li></ul></ul>
    7. 7. Leverage Platform as a Service <ul><li>Low operational overhead </li></ul><ul><li>Simplified deployment </li></ul><ul><li>No dedicated operations engineer </li></ul><ul><li>Spin up and down development, test, and preproduction environments quickly and easily </li></ul>PAAS eliminates the need for us to focus on deployment, management, and administration of our application container, data container, and other higher level infrastructure
    8. 8. The result? <ul><li>We spend most of our calories worrying about delivering the most compelling and effective consumer experience </li></ul><ul><li>Our time, effort, and opportunity isn’t spent on simply running the infrastructure required to support our users </li></ul><ul><ul><li>But we’re still up 3 nines </li></ul></ul><ul><ul><li>An average request to our server is fulfilled in under 250ms </li></ul></ul><ul><li>Our laser focus translates into a superior customer experience for our users </li></ul>LASER FOCUS
    9. 9. What technology? <ul><li>Java / Tomcat </li></ul><ul><ul><li>Compiler checked </li></ul></ul><ul><ul><li>High performance </li></ul></ul><ul><ul><li>Native GWT Support </li></ul></ul><ul><li>MySQL </li></ul><ul><ul><li>Relational </li></ul></ul><ul><ul><li>Proven </li></ul></ul><ul><ul><li>Use both InnoDB / MyISAM </li></ul></ul><ul><li>Web – Google Web Toolkit </li></ul><ul><ul><li>Compiler checked </li></ul></ul><ul><ul><li>Encodes best practices from Google </li></ul></ul><ul><ul><li>Mobile – native and GWT/HTML hybrid client </li></ul></ul>
    10. 10. What cloud services? Application Development <ul><li>Development and staging environments </li></ul><ul><li>Iterative deployment services </li></ul><ul><li>Build services and continuous deployment (future) </li></ul><ul><li>Source code management </li></ul><ul><li>Issue Tracking </li></ul>
    11. 11. What cloud services? Application Runtime <ul><li>Scalable Java application stack </li></ul><ul><li>HTTP routing and load-balancing </li></ul><ul><li>Clustered database services </li></ul><ul><li>Server hardware and virtualization </li></ul><ul><li>Network management </li></ul><ul><li>Data storage devices </li></ul><ul><li>Email services </li></ul>
    12. 12. What cloud services? Application Monitoring / Operations <ul><li>Application performance monitoring </li></ul><ul><li>Uptime tracking and alerting </li></ul><ul><li>Application and database recovery </li></ul><ul><li>Umbrella support - someone to call! </li></ul>
    13. 13. Architecture
    14. 14. The Myth of the Cloud / Black Box <ul><li>Infrastructure and platform as a service is a *great* abstraction </li></ul><ul><li>Your application has its own characteristics </li></ul><ul><li>The infrastructure itself has particular characteristics </li></ul><ul><li>There is no single cloud configuration that represents a well tuned, reliable, and high performance solution for every profile of application </li></ul>
    15. 15. Real World EC2 <ul><li>Persistent disk I/O (EBS) performance not great </li></ul><ul><ul><li>Also can be more variable than you’d expect </li></ul></ul><ul><ul><li>Ripples into data performance, esp. for disk intensive work like transactional writes (InnoDB) </li></ul></ul><ul><li>Hardware itself is not configurable </li></ul><ul><ul><li>Can’t add a battery backed up disk write cache for performance </li></ul></ul><ul><li>Pay attention to EC2 instance sizes </li></ul><ul><ul><li>Remember that a small instance is really a very slow computer </li></ul></ul><ul><ul><li>And depending upon instance sizes, you will be sharing physical resources with other applications. </li></ul></ul>
    16. 16. Real world advice <ul><li>For MySQL, use big instances with huge RAM. Configure big caches to protect you from slow I/O </li></ul><ul><li>Protect your database with application caches (even simple simple Hashmaps) </li></ul><ul><li>Design application / data storage to support sharding </li></ul><ul><li>Make sure app server tier is cluster safe </li></ul><ul><li>Use queuing to decouple work from main application </li></ul>
    17. 17. More Challenges <ul><li>The cloud and PAAS does provide incredible leverage, but some things are actually a pain in this environment. </li></ul><ul><li>Scheduled jobs </li></ul><ul><li>Logging /Server diagnostics / error reporting </li></ul><ul><li>Full text search implementations </li></ul><ul><li>Server coordination </li></ul><ul><li>Portability </li></ul><ul><li>File Storage </li></ul>
    18. 18. Wrap up <ul><li>The cloud gives small teams unprecedented leverage to build and deploy applications </li></ul><ul><li>But it’s no silver bullet </li></ul><ul><li>Application architecture may be even more important to achieving scale on the cloud </li></ul><ul><li>Beware the myth of the cloud/blackbox </li></ul><ul><li>Get real about the platform that you’re deploying </li></ul><ul><li>Leverage platform as a service to gain leverage </li></ul>