Repartition/redistribute our data or use consistent hashing

This approach has a couple of issues:

  1. What if a user becomes hot? There could be a lot of queries on the server holding the user. This high load will affect the performance of our service.
  2. Over time some users can end up storing a lot of tweets or having a lot of follows compared to others. Maintaining a uniform distribution of growing user data is quite difficult.

To recover from these situations either we have to repartition/redistribute our data or use consistent hashing.

How would consistent hashing solve above? With consistent hashing, each user still gets mapped to the same server. As a result, hot users will still causes certain servers to be loaded.

1 Like

Hi @Dewey_Munoz

Consistent hashing not only means data partitioning but also data replication. So data will be replicated on different servers and users will be mapped to the respective servers accordingly not only to the one same server.