Slicer: Auto-Sharding for Datacenter Applications

Sharding is a fundamental building block of large-scale applications, but most have their own custom, ad-hoc implementations. Our goal is to make sharding as easily reusable as a filesystem or lock manager. Slicer is Google's general purpose sharding service. It monitors signals such as load hotspots and server health to dynamically shard work over a set of servers. Its goals are to maintain high availability and reduce load imbalance while minimizing churn from moved work. In this paper, we describe Slicer's design and implementation. Slicer has the consistency and global optimization of a centralized sharder while approaching the high availability, scalability, and low latency of systems that make local decisions. It achieves this by separating concerns: a reliable data plane forwards requests, and a smart control plane makes load-balancing decisions off the critical path. Slicer's small but powerful API has proven useful and easy to adopt in dozens of Google applications. It is used to allocate resources for web service front-ends, coalesce writes to increase storage bandwidth, and increase the efficiency of a web cache. It currently handles 2-7M req/s of production traffic. The median production Slicer-managed workload uses 63% fewer resources than it would with static sharding.

[1]  Michael Stonebraker,et al.  E-Store: Fine-Grained Elastic Partitioning for Distributed Transaction Processing , 2014, Proc. VLDB Endow..

[2]  Irfan Ahmad,et al.  BASIL: Automated IO Load Balancing Across Storage Devices , 2010, FAST.

[3]  Brian F. Cooper Spanner: Google's globally-distributed database , 2013, SYSTOR '13.

[4]  David R. Karger,et al.  Consistent hashing and random trees: distributed caching protocols for relieving hot spots on the World Wide Web , 1997, STOC '97.

[5]  Carlo Contavalli,et al.  Maglev: A Fast and Reliable Software Network Load Balancer , 2016, NSDI.

[6]  Ashraf Aboulnaga,et al.  Accordion: Elastic Scalability for Database Systems Supporting Distributed Transactions , 2014, Proc. VLDB Endow..

[7]  Gregory Cooper,et al.  Thialfi: a client notification service for internet-scale applications , 2011, SOSP '11.

[8]  Albert G. Greenberg,et al.  Ananta: cloud scale load balancing , 2013, SIGCOMM.

[9]  Mithuna Thottethodi,et al.  Understanding and mitigating the impact of load imbalance in the memory caching tier , 2013, SoCC.

[10]  Matt Welsh,et al.  Flywheel: Google's Data Compression Proxy for the Mobile Web , 2015, NSDI.

[11]  Parag Agrawal,et al.  The case for RAMClouds: scalable high-performance storage entirely in DRAM , 2010, OPSR.

[12]  James R. Larus,et al.  Orleans: cloud computing for everyone , 2011, SoCC.

[13]  Jiri Schindler,et al.  A load balancing framework for clustered storage systems , 2008, HiPC'08.

[14]  Jitendra Padhye,et al.  Duet: cloud scale load balancing with hardware and software , 2015, SIGCOMM.

[15]  Brett D. Fleisch,et al.  The Chubby lock service for loosely-coupled distributed systems , 2006, OSDI '06.

[16]  Wilson C. Hsieh,et al.  Bigtable: A Distributed Storage System for Structured Data , 2006, TOCS.

[17]  Monia Ghobadi,et al.  Efficient traffic splitting on commodity switches , 2015, CoNEXT.

[18]  Werner Vogels,et al.  Dynamo: amazon's highly available key-value store , 2007, SOSP.

[19]  Alec Wolman,et al.  Centrifuge: Integrated Lease Management and Partitioning for Cloud Services , 2010, NSDI.

[20]  Arun Sharma,et al.  Social Hash: An Assignment Framework for Optimizing Distributed Systems Operations on Social Networks , 2016, NSDI.

[21]  Leslie Lamport,et al.  The part-time parliament , 1998, TOCS.