Lecture 04 - Cloud Storage
Lecture 04 - Cloud Storage
Computing
Lecture 4
Storage – CAP
RDBMS
Dan Amiga
[email protected]
Stateless Instances
http://yourapp.cloudapp.net
Putting It All Together
Storage
Stateless compute
+ Durable storage
-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐
= Scalable application
Scale-up And Scale-out
Volume
Volume
WWW
$10,000
machine DNS
$1000
machine
# Machines
Scale Up Scale Out
Scale Up vs Scale Out
• Scale Up
– Easier (?)
– Bounded
– Expensive and proprietary
– Sometimes a must (?)
• Scale Out
– Harder (?)
– Slower when you start…
– Maintain Session (sticky vs regular)
– Unbounded, Cheaper, Always a must
• Storage is key for scaling out
On Premise / Traditional Storage Choices
• Ephemeral Storage
• Elastic Block Storage (EBS)
• S3
• SQS
• NoSQL – Simple / Dynamo
• Relational Database Storage
• Storage Gateway
http://www.slideshare.net/AmazonWebServic
es/aws-storage-options
Amazon S3
• https://www.dropbox.com/help/7
• http://aws.amazon.com/s3/
• 1kb to 5TB of unlimited number
• You can choose a Region to optimize for
latency, minimize costs, or address
regulatory requirements.
• http://aws.amazon.com/s3-sla/
CAP Theorem
• Consistency (Atomic data objects)
– any read operation that begins after a write operation
completes must return that value, or the result of a
later write operation.
– E.g. if A writes 1 then 2 to location X, client B cannot
read 2 followed by 1.
• Available Data Objects
– even when severe (network? storage?) failures occur,
every request must terminate + minimal latency.
– Easier – all operations return successfully
• Partition Tolerance
– No set of failures less than total network failure is
allowed to cause the system to respond incorrectly.
– Easier – if the network stop delivering messages
between two sets of servers, the system will still
continue to work.
Simplified Proof
CAP Transactional Analysis
• Consistency give up
– DNS; Inconsistency;
• Availability give up
– Bad idea… Use retries
• Partition Tolerance
– VLDB/Clusters; Synchronous 2-phase commit
CAP In the real world
• http://www.allthingsdistributed.com/2007/12/eventually_consis
tent.html
Eventual Consistency