February 2020
Intermediate to advanced
734 pages
38h 13m
English
How does an application know which shard it should use in any particular situation? This answer requires one more modification to the table structure that our application uses. Our last decision involves adding a shard_id column to one table. This table can be anything, but should represent some defining aspect that can centralize related data.
A good choice for this is a customer table. In an order system, all interaction is eventually driven by customer activity. If we assign a customer a specific shard ID, all of their order data will be stored in that shard. As the application likely has the customer row information available at all times, it should also know the associated shard, and ...
Read now
Unlock full access