3

I am studying system design for distributed systems and in this page (https://github.com/donnemartin/system-design-primer), one of the following advantages was mentioned for federation for databases was:

Smaller databases result in more data that can fit in memory, which in turn results in more cache hits due to improved cache locality.

What I don't understand is why would smaller databases have more memory? Furthermore, how does federation improve cache locality and result in more cache hits?

2
  • see Discuss this ${blog}
    – gnat
    Mar 28 at 7:56
  • 4
    It is a bullshit argument. The argument is basically “given a database with X GB of RAM and some dataset with size Y > X, then some data won't fit into RAM (cache ratio X/Y). But if you somehow divide your data into three separate databases, then you get a better cache ratio 3×X/Y”. However, you then also need 3× the servers and 3× the total RAM. In practice, it's often easier to get a beefier database server than to create a complicated distributed system, especially as federation requires you to give up lots of ACID guarantees. Fewer servers also tends to imply better resource utilization.
    – amon
    Mar 28 at 12:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.