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.

9128d500301ae51524e887bb680f471d?s=128

Caitie McCaffrey

September 27, 2015
Tweet

Transcript

  1. 45.

    Linearizable Sequential Causal Pipelined Random Access Memory Read Your Write

    Monotonic Read Monotonic Write Write From Read Consistency Models CP Consistency AP Consistency
  2. 46.

    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. 47.

    - 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. 73.

    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. 80.

    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. 81.

    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. 82.

    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. 83.

    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. 84.

    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. 85.

    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. 86.

    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. 87.

    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. 88.

    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. 101.

    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. 102.

    Conclusion Data Locality & Available Consistency Cluster Membership & Work

    Distribution Successful Statefull Real World Systems Caution: Some New Challenges
  16. 106.
  17. 107.