Caching In The Cloud

13

Click here to load reader

description

5 minute talk from the St. Louis Cloud Camp about using Terracotta in the cloud for caching and more.

Transcript of Caching In The Cloud

Page 1: Caching In The Cloud

Caching in the CloudAlex MillerTerracotta

Twitter: @puredanger Blog: http://tech.puredanger.com

Page 2: Caching In The Cloud

Clouds

• Blah blah blah scalability blah blah blah elasticity blah blah blah efficiency blah blah blah

Page 3: Caching In The Cloud

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

Page 4: Caching In The Cloud

Ideal Cloud Data Layer

• Protects “in-flight” data - durability

• Has low latency, high throughput

• Deploys elastically w/app tier

• Doesn’t require app changes

Page 5: Caching In The Cloud

NoSQL

• Key-value stores

• Document databases

• And many other flavors...

Page 6: Caching In The Cloud

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

Page 7: Caching In The Cloud

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

Page 8: Caching In The Cloud

Database Offload

• Scale your app (use the cloud)

• Scale your data (use Terracotta)

• Don’t scale your db (use for historical)

Page 9: Caching In The Cloud

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

Page 10: Caching In The Cloud

Deployment Approach

Page 11: Caching In The Cloud

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

Page 12: Caching In The Cloud

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

Page 13: Caching In The Cloud

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