Database Reference
In-Depth Information
Request coordinator
The request coordinator is an event-driven messaging component that works like Staged-
Even Drive Architecture ( SEDA ). Here, we break the complex event into multiple stages.
This decouples event and thread scheduling from application logic. You can read more
about SEDA at www.eecs.harvard.edu/~mdw/proj/seda/ . This component is mainly re-
sponsible for handling any client requests coming its way.
Suppose a coordinator receives a get request, then it asks for the data from the respective
nodes where the key range lies. It waits till it gets the acceptable number of responses and
does the reconciliation if required. If it receives a number of responses that is less than de-
sired, then it fails the request. After the request is fulfilled, this process waits for some time
if any delayed responses arrive. If any node returns stale data versions, then the coordinator
updates data with the correct version on that node.
In the case of write requests, the top N nodes in the preferred list are chosen to store the up-
date. It might be the case that a particular node appears in many preferred lists. Then, it
would lead to uneven distribution of load. In that case, DynamoDB has an intelligent way
to choose the write coordinator. Normally, it is seen that a write operation follows a read
operation. So, the coordinator that has responded fastest in the previous read request is
chosen to be the coordinator for the write operation. The information about the previous
read operation can be obtained from context. This strategy is also useful in another way in
that it writes the same data version that was read earlier.
Search WWH ::




Custom Search