Presentation is loading. Please wait.

Presentation is loading. Please wait.

Service Primitives for Internet Scale Applications Amr Awadallah, Armando Fox, Ben Ling Computer Systems Lab Stanford University.

Similar presentations


Presentation on theme: "Service Primitives for Internet Scale Applications Amr Awadallah, Armando Fox, Ben Ling Computer Systems Lab Stanford University."— Presentation transcript:

1 Service Primitives for Internet Scale Applications Amr Awadallah, Armando Fox, Ben Ling Computer Systems Lab Stanford University

2 2 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Interactive Internet-Scale Application? n Millions of users. Global LB Local LB Presentation Servers + $ LB Application Servers + $ Fail over StateReplica Local LB Presentation Servers + $ Presentation Servers + $ Application Servers + $ Application Servers + $ Data Center State PS + $ LB AS + $ Fail over Local LB State PS + $ LB AS + $ Fail over

3 3 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Motivation n A general framework to describe IIA’s and characterize the functional properties that can be traded away to improve the following operational metrics: l Throughput (how many user requests/sec?) l Interactivity (latency, how fast user requests finish?) l Availability (% of time user perceives service as up), including fast recovery to improve availability l TCO (Total Cost of Ownership) n In particular, enumerate architectural primitives that expose partial degradation of functional properties and illustrate how they can be built with “commodity” HW.

4 4 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Recall ACID n Atomicity: For a transaction involving two or more discrete pieces of information, either all pieces changed are committed or none. n Consistency: A transaction creates a new valid state obeying all user integrity constraints. n Isolation: Changes from non-committed transactions remains hidden from all other concurrent transactions (Serializable, Repeatable-R, Commited-R, Uncommit-R) n Durability: Committed data survives beyond system restarts and storage failures.

5 5 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. ACID is too much for Internet scale n Yahoo UDB: tens of thousands of reads/sec, up to 10k writes/sec n Geoplexing used for both disaster recovery and scalability, but eager replication (strong consistency) across replicas scales poorly l If total DB size grows with # nodes, deadlock rate increases at the same rate as number of nodes l If DB size grows sublinearly, deadlock rate increases as cube of number of nodes n Even if we could use transactional DB’s and eager replication, cost would be too high

6 6 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. The New Properties n Durability (State): Hard, Soft, Stateless n Consistency: Strong, Eventual, Weak, NonC n Completeness: Full, Incomp-R, Lossy-W n Visibility: User, Entity, World

7 7 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Durability (Hard, Soft, Stateless) n Hard: This is permanent state in the original sense of the D in ACID. n Soft: This is temporary storage in the RAM sense, i.e. if power fails then data is lost. This is cheaper and acceptable if user can rebuild state quickly. n Stateless: No need to store state on behalf of the user.

8 8 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Consistency (Strong, Eventual, Weak) n Eventual: after a write, there is some time t after which all reads see the new value. (eg caching) n Strong: in addition, before time t, no reads see the new value (single-copy ACID consistency) n Weak: This is weak consistency in the TACT sense - captures ordering inaccuracies, or persistent staleness.

9 9 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Completeness (Full, Incomp, Lossy) n Complete: all updates either succeed, or fail synchronously. All queries return 100% accurate data. n Incomplete Queries: This is aggregated lossy reads over partitioned state, or state sampling. The best example here is Inktomi’s distributed search where its ok that some partitions not return results under load. n Lossy Updates: This means that its ok for some commited writes to not make it. Example: Lossy Counters and online polls.

10 10 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Visibility (World, Entity, User) n World: The state and changes to it are visible to all the world, e.g. listing a product on eBay. n Entity: State is only visible to a group of users, or within a specific subset of the data (e.g. eBay Jewlery) n User: The state and changes to it are only visible to the user interacting with it, e.g. the MyYahoo user profile. This could be simpler to implement using ReadMyWrites techniques.

11 11 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Architectural Primitives PrimitivesTradesGains Caching, Replication Eventual Consistency Interactiveness, Availability, Throughput PartitioningEntity Visibility Interactiveness, Graceful Degradation Lossy/Sampled Aggregation Weak ConsistencyInteractiveness, Graceful Degradation

12 12 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. Examples of Primitives LossyUpdate(key,newVal) LossyAccumulator(key, updateOp) - for commutative ops LossyAggregate(searchKeys) - lossy search of an index

13 13 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. LossyUpdate implementation n LossyUpdate l Steve Gribble’s DHT: atomic ops, single-copy consistency; during failure recovery, reads are slower and writes are refused l If update occurs while updated partition is recovering => fail l Otherwise, update is persistent l When is this useful? n LossyAccumulator (for hit counter, online poll, etc) l Every period T, in-memory sub-accumulators from worker nodes are swept to persistent copy l At the same time, current value of master accumulator is read by each worker node, to serve reads locally l Worker nodes don’t backup in-memory copy => fast restart l Can bound loss rate of accumulator and inconsistency in read

14 14 Service Primitives for Interactive Internet-Scale Applications. Amr Awadallah, Armando Fox, Ben Ling. ROC, Sep 2002. What is given up n What is given up l Strict consistency of read copies of accumulator l Precision of accumulator value (lost updates) n What is gained: fast recovery for each node, continuous operation despite transient per-node failures


Download ppt "Service Primitives for Internet Scale Applications Amr Awadallah, Armando Fox, Ben Ling Computer Systems Lab Stanford University."

Similar presentations


Ads by Google