just do it!

Click here to load reader

Post on 14-Jan-2015




2 download

Embed Size (px)


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


  • 1. Just Do It! Building and running high volume applications in the cloud Charles Teague CEO, FitNow, Inc.

2. What is Lose It?

  • Free mobile application, website
    • Calorie tracking
    • Peer support using social networking
  • Lose It! by the numbers
    • 7+ million downloads
    • 1m+ Loseit.com users
    • 15,000 requests per minute, 24x7 load
    • 4 people working full time at Lose It!
  • Helped users lose more than 5.5 million pounds since 2009

3. What does that have to do with the cloud?!

  • Lose It! started as a local only mobile application
  • Need for additional capabilities drove need for web service
    • Client -> web sync support
    • Social features
    • Web version of Lose It!
  • Unpredictable initial demand and usage growth made it difficult to estimate scale
  • Millions of users made high volume likely
  • As a startup, our team is small

4. Our challenge was to build and run a service that supports millions of users with very limited resources 5. How can we do this?

  • Use the cloud and platform as a service to make development, deployment, and operation of our service faster and easier.*

LEVERAGE 6. Leverage the cloud

  • Low startup cost
  • Ability to scale in response to anticipated demand
  • Efficiently onboard new services and capabilities
  • Choose deep, best of breed services that represent significantly more technology and expertise than wed be able to create ourselves.
    • Use of cloud eliminates need for us to focus on deployment, management, and administration of compute, disk, and other lower level infrastructure

7. Leverage Platform as a Service

  • Low operational overhead
  • Simplified deployment
  • No dedicated operations engineer
  • Spin up and down development, test, and preproduction environments quickly and easily

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. The result?

  • We spend most of our calories worrying about delivering the most compelling and effective consumer experience
  • Our time, effort, and opportunity isnt spent on simply running the infrastructure required to support our users
    • But were still up 3 nines
    • An average request to our server is fulfilled in under 250ms
  • Our laser focus translates into a superior customer experience for our users

LASER FOCUS 9. What technology?

  • Java / Tomcat
    • Compiler checked
    • High performance
    • Native GWT Support
  • MySQL
    • Relational
    • Proven
    • Use both InnoDB / MyISAM
  • Web Google Web Toolkit
    • Compiler checked
    • Encodes best practices from Google
    • Mobile native and GWT/HTML hybrid client

10. What cloud services? Application Development

  • Development and staging environments
  • Iterative deployment services
  • Build services and continuous deployment(future)
  • Source code management
  • Issue Tracking

11. What cloud services? Application Runtime

  • Scalable Java application stack
  • HTTP routing and load-balancing
  • Clustered database services
  • Server hardware and virtualization
  • Network management
  • Data storage devices
  • Email services

12. What cloud services? Application Monitoring / Operations

  • Application performance monitoring
  • Uptime tracking and alerting
  • Application and database recovery
  • Umbrella support - someone to call!

13. Architecture 14. The Myth of the Cloud / Black Box

  • Infrastructure and platform as a service is a *great* abstraction
  • Your application has its own characteristics
  • The infrastructure itself has particular characteristics
  • There is no single cloud configuration that represents a well tuned, reliable, and high performance solution for every profile of application

15. Real World EC2

  • Persistent disk I/O (EBS) performance not great
    • Also can be more variable than youd expect
    • Ripples into data performance, esp. for disk intensive work like transactional writes (InnoDB)
  • Hardware itself is not configurable
    • Cant add a battery backed up disk write cache for performance
  • Pay attention to EC2 instance sizes
    • Remember that a small instance is really a very slow computer
    • And depending upon instance sizes, you will be sharing physical resources with other applications.

16. Real world advice

  • For MySQL, use big instances with huge RAM. Configure big caches to protect you from slow I/O
  • Protect your database with application caches (even simple simple Hashmaps)
  • Design application / data storage to support sharding
  • Make sure app server tier is cluster safe
  • Use queuing to decouple work from main application

17. More Challenges

  • The cloud and PAAS does provide incredible leverage, but some things are actually a pain in this environment.
  • Scheduled jobs
  • Logging /Server diagnostics / error reporting
  • Full text search implementations
  • Server coordination
  • Portability
  • File Storage

18. Wrap up

  • The cloud gives small teams unprecedented leverage to build and deploy applications
  • But its no silver bullet
  • Application architecture may be even more important to achieving scale on the cloud
  • Beware the myth of the cloud/blackbox
  • Get real about the platform that youre deploying
  • Leverage platform as a service to gain leverage