Data Sharding Flashcards
What is sharding or data partitioning?
Breaking up a database into smaller parts
Why would you shard a database?
In order to scale, split up among multiple machines
Horizontal partitioning
put different rows into different tables
What is a con of horizontal partitioning?
Must choose range values carefully so the servers are not unbalanced
Vertical partitioning
Divide data based on specific features (ie users on one server, posts on another, etc)
What is a con of vertical partitioning?
If the application experiences additional growth, it may be necessary to partition further
Directory based partitioning
create a lookup service that knows the partitioning scheme and abstracts it away from the DB code. Query the directory server to figure out what DB to look at