chapter five
5 Partitioning
This chapter covers
- Understanding the benefits and downsides of partitioning
- Partitioning strategies and how to choose one
- Request routing when partitioning
- Skewed workloads and hot partitions and how to mitigate against them
In the previous two chapters, we explored techniques for reducing latency with colocation and replication. Colocation places related computing such as business logic and data resources nearby, which minimizes the network distance between them. Colocation can improve latency because you reduce communication latency between the components. For example, an application that uses serverless functions for backend logic may benefit from a database that is colocated with the serverless runtime. Replication, on the other hand, is a technique for copying relevant data at multiple locations while maintaining consistency between the copies. With replication, you get the same kind of benefits as with colocation, but at multiple different places.