Evaluating the design
High performance
- Consistent Hashing results in O(log(N)) complexity where N represents the number of shards
- On a hash server, it takes constant time to retrieve a value using the key O(1)
- for eviction in the linked list
Let’s assess the effective access time considering there could be cache hits and misses.
EAT = Ratio (hit) x Time (hit) + Ratio(miss) x Time (miss)
if MFU, we have 10% cache miss and for LRU, 5% cache miss rate
MFU-EAT = 0.9 x 5ms + 0.1 x 30ms 0.9 x 0.005 + 0.1 x 0.030 0.0045 + 0.003 = 0.0075 - 7.5 ms
LRU-EAT = 0.95 x 5ms + 0.05 x 30ms 0.95 x 0.005 + 0.05 x 0.03 0.00475 + 0.0015 = 0.00625 = 6.25ms