3. Database Pain
• Scale in cloud
• Born in enterprise -> doesn’t work at web scale
• Expensive (RAC) or complicated (MySQL
sharding)
• Elasticity in cloud
• Harder to migrate disk than to migrate
processes
• Single coordination point constrains flexibility
4. Ideal Cloud Data Layer
• Protects “in-flight” data - durability
• Has low latency, high throughput
• Deploys elastically w/app tier
• Doesn’t require app changes
6. Terracotta
• Open-source Java clustering technology
• Clustered - dynamically add/remove nodes
• High availability - server-based w/failover
• Data is redundant, copied to disk for backup
• In-memory speed
7. Don’t Change Your App!
• Hibernate Second Level Cache - ORM
• Ehcache - data caching
• Quartz - scheduling and job recovery
• HTTP Sessions - session availability
• Spring - app wiring and state
8. Database Offload
• Scale your app (use the cloud)
• Scale your data (use Terracotta)
• Don’t scale your db (use for historical)
9. Hotel company
• Business
• Room reservation + loyalty points
• Multiple mainframe apps
• Estimate: $12M, 5 years -> Oracle RAC
• Instead:
• Private cloud
• VMWare, Spring, Terracotta
• Saving $11M / year on DB and App Server licenses
11. Travel Reservation
System
• Problem
• Mainframe costs >$5M / year in EDS fees
• Retain high reliability in lower cost env
• Solution
• Private data cloud - Terracotta + Ehcache
• Saved $5M / year
• 99.99% reliability
12. Gnip
• Web feeds, message transformation, delivery
• Twitter, Delicious, Flickr, etc
• Problem: large quantities of transient data
• Solution:
• 12 nodes on EC2
• Terracotta for data storage
• 50k TPS
13. Scalability Continuum
• Write your app once using standard open
source technologies
• Same app works on your machine, in your
test env, in the cloud
• Change where and how you deploy, not
your app