Previous | Next --- Slide 15 of 40
Back to Lecture Thumbnails
Xelblade

Some negatives to the partition model:

Requests that involve accessing multiple databases would be a lot worse since you have to hit multiple databases to service the request instead of just one.

Also, it's difficult to distribute data among the databases equally.

tliao

There is a common solution for the data distribution problem and that is to use consistent hashing to map data to servers. For example, instead of mapping a certain range of names to a server, which is unbalanced since names aren't equally distributed across all people, the servers can hash the data and instead map the hash to servers.

chenc3

But using consistent hashing might reduce locality and increase response time since getting data from a nearby server is faster than getting data from servers far away.

ToBeContinued

Solution to sharding also involves hash-by-content, where the hash value of the stored object is based on the the content of the object but not just things like username or title. This is especially common in P2P.