2

This a design question about the Caching component, I can see two approaches in determining where is the data:

  • Each role instance maintains a table containing the entire set of keys, tracking the corresponding instance holding the data.
  • The location of the data is determined by the hash code of the key.

In the first case, it would mean that it's important to keep a reasonable set of keys. In the second case, that testing the existence of a key would generate a network round trip...

uzul
  • 1,096
  • 9
  • 23

1 Answers1

0

My guess is 2), it utilize hash to determine the location, maybe consistent hashing.

And I think yes, testing the existence of a key would generate a network I/O, but I don't think it needs to call all you co-location server since from the hash it should know which server contains your data and just need to connect to it.

Shaun Xu
  • 4,476
  • 2
  • 27
  • 41