“Under heavy write load you should scale your read throughput by reading from secondaries”
Why the above statement is “false”?
Let’s imaging the following situation:
We have 5 machines: P-S-S-S-S.
The primary is highly loaded with write-requests, which means, that all 3 members are highly (and equally) loaded (because of the replication).
Let’s quantify all the workload as: 200X writes and 800Y reads.
If all the read-requests go to the primary - primary will have to do all the work: 200X + 800Y.
But, if we distribute read operations across secondaries, each machine will have the following workload:
P = 200X
each S = 200X + (800/4) = 200X + 200Y.
As read operations are spread between secondaries, each node becomes less overloaded so:
- it potentially can handle move operations
- distributed requests can be executed in parallel on each machine and deliver the result faster (reads are not queued in long queues).
Please, help me clarify this: why the last answer is “false”?