Information Technology Reference
In-Depth Information
The easiest way to store state is to put it on one machine, as depicted in Figure 1.4 .
Unfortunately, that method reaches its limit quite quickly: an individual machine can store
only a limited amount of state and if the one machine dies we lose access to 100 percent
of the state. The machine has only a certain amount of processing power, which means the
number of simultaneous reads and writes it can process is limited.
Figure 1.4: State kept in one location; not distributed computing
Indistributedcomputingwestorestatebystoringfractionsorshardsofthewholeonin-
dividualmachines.Thiswaytheamountofstatewecanstoreislimitedonlybythenumber
of machines we can acquire. In addition, each shard is stored on multiple machines; thus a
single machine failure does not lose access to any state. Each replica can process a certain
number of queries per second, so we can design the system to process any number of sim-
ultaneousreadandwriterequestsbyincreasingthenumberofreplicas.Thisisillustratedin
Figure 1.5 , where N QPS are received and distributed among three shards, each replicated
threeways.Asaresult,onaverage oneninthofallqueriesreachaparticular replica server.
Search WWH ::




Custom Search