Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Scalable Stateful Services

Building Scalable Stateful Services

The Stateless Service design principle has become ubiquitous in the tech industry for creating horizontally scalable services. However our applications do have state, we just have moved all of it to caches and databases. Today as applications are becoming more data intensive and request latencies are expected to be incredibly low, we’d like the benefits of stateful services, like data locality and sticky consistency. In this talk I will address the benefits of stateful services, how to build them so that they scale, and discuss projects from Halo and Twitter of highly distributed and scalable services that implement these techniques successfully.

Caitie McCaffrey

September 27, 2015
Tweet

More Decks by Caitie McCaffrey

Other Decks in Programming

Transcript

  1. Linearizable Sequential Causal Pipelined Random Access Memory Read Your Write

    Monotonic Read Monotonic Write Write From Read Consistency Models CP Consistency AP Consistency
  2. Linearizable Sequential Causal Pipelined Random Access Memory Read Your Write

    Monotonic Read Monotonic Write Write From Read CP Consistency AP Consistency AP Consistency w/ Sticky Connections Consistency Models
  3. - Werner Vogel 2007 “Whether or not read-your-write, session and

    monotonic consistency can be achieved depends in general on the "stickiness" of clients to the server that executes the distributed protocol for them… Using sessions, which are sticky, makes this explicit and provides an exposure level that clients can reason about.”
  4. Consistent Hashing Deterministic Placement Node A Node B Node C

    NodeD Consistent Hashing & Random Trees: Distributed caching protocols for relieving hot spots on the World Wide Web
  5. Scuba is a fast, scalable, distributed, in-memory database built at

    Facebook. It is the workhorse behind code regression analysis & bug report, revenue, and performance debugging Fan-out request to all machines in the cluster Compose Results Return Results and Completeness
  6. Scuba is a fast, scalable, distributed, in-memory database built at

    Facebook. It is the workhorse behind code regression analysis & bug report, revenue, and performance debugging Fan-out request to all machines in the cluster Compose Results Return Results and Completeness
  7. Scuba is a fast, scalable, distributed, in-memory database built at

    Facebook. It is the workhorse behind code regression analysis & bug report, revenue, and performance debugging Fan-out request to all machines in the cluster Compose Results Return Results and Completeness
  8. Uber Ringpop is an open- source Node.js library that brings

    application-layer sharding to many of their dispatching platform services. Swim Gossip Protocol Consistent Hashing +
  9. Uber Ringpop is an open- source Node.js library that brings

    application-layer sharding to many of their dispatching platform services. Swim Gossip Protocol Consistent Hashing +
  10. Uber Ringpop is an open- source Node.js library that brings

    application-layer sharding to many of their dispatching platform services. Swim Gossip Protocol Consistent Hashing +
  11. Orleans Cluster Orleans is a runtime and Programming model for

    building distributed systems based on the Actor Model from the eXtreme Computing Group at MSR Gossip Protocol Consistent Hashing + + Distributed Hash Table Actor Actor Actor Actor Actor
  12. Orleans Cluster Orleans is a runtime and Programming model for

    building distributed systems based on the Actor Model from the eXtreme Computing Group at MSR Gossip Protocol Consistent Hashing + + Distributed Hash Table Actor Actor Actor Actor Actor
  13. Orleans Cluster Orleans is a runtime and Programming model for

    building distributed systems based on the Actor Model from the eXtreme Computing Group at MSR Gossip Protocol Consistent Hashing + + Distributed Hash Table Actor Actor Actor Actor Actor
  14. Fast Restarts at Facebook “Our Key Observation is that we

    can decouple the memory lifetime from the process lifetime. When we shutdown a server for a planned upgrade.”
  15. Conclusion Data Locality & Available Consistency Cluster Membership & Work

    Distribution Successful Statefull Real World Systems Caution: Some New Challenges