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

CraftConf 2016 - Building Scalable Stateful Services

CraftConf 2016 - 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 distributed and scalable services in the real world that implement these techniques successfully.

Caitie McCaffrey

April 29, 2016
Tweet

More Decks by Caitie McCaffrey

Other Decks in Technology

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. Twitter Nuthatch is a temporal set indexing service. Helps resolve

    glob queries in metric names. Static Cluster Membership + Hashing
  9. Twitter Nuthatch is a temporal set indexing service. Helps resolve

    glob queries in metric names. Static Cluster Membership + Hashing
  10. Twitter Nuthatch is a temporal set indexing service. Helps resolve

    glob queries in metric names. Static Cluster Membership + Hashing
  11. 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 +
  12. 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 +
  13. 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 +
  14. 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
  15. 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
  16. 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
  17. 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.”
  18. Conclusion Data Locality & Available Consistency Cluster Membership & Work

    Distribution Successful Stateful Real World Systems Caution: Some New Challenges