Download - Just do it!
Just Do It!Building and running high volume applications in the
cloud
Charles TeagueCEO, FitNow, Inc.
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
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 serviceClient -> web sync supportSocial featuresWeb 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
Our challenge was to build and run a service that supports millions of users with very limited resources…
How can we do this?
LEVERAGEUse the cloud and platform as a service to
make development, deployment, and operation of our service faster and easier.*
Leverage the cloudLow 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 we’d 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
Leverage Platform as a ServiceLow 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
The result?
We spend most of our calories worrying about delivering the most compelling and effective consumer experience
Our time, effort, and opportunity isn’t spent on simply running the infrastructure required to support our usersBut we’re still up 3 ninesAn average request to our server is fulfilled in under 250ms
Our laser focus translates into a superior customer experience for our users
LASER FOCUS
What technology?Java / Tomcat
Compiler checkedHigh performanceNative GWT Support
MySQLRelationalProvenUse both InnoDB / MyISAM
Web – Google Web ToolkitCompiler checkedEncodes best practices from GoogleMobile – native and GWT/HTML hybrid client
What cloud services?Application Development
Development and staging environments
Iterative deployment services
Build services and continuous deployment (future)
Source code management
Issue Tracking
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
What cloud services?Application Monitoring / Operations
Application performance monitoring
Uptime tracking and alerting
Application and database recovery
Umbrella support - someone to call!
Architecture
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
Real World EC2Persistent disk I/O (EBS) performance not
great Also can be more variable than you’d expect Ripples into data performance, esp. for disk intensive work like
transactional writes (InnoDB)
Hardware itself is not configurable Can’t 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.
Real world adviceFor 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
More ChallengesThe 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
Wrap upThe cloud gives small teams unprecedented
leverage to build and deploy applications
But it’s 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 you’re deploying
Leverage platform as a service to gain leverage