consistency - Perform reading from a paxos-based distributed cluster -
could 1 help introduce how read contents distributed cluster?
i mean there distributed cluster who's consistency guaranteed paxos algorithm.
in real-world application, how client read contents have written cluster?
for example, in 5 servers cluster, maybe 3 of them newest info , other 2 have old info due network delay or something.
does means client needs read @ to the lowest degree bulk of nodes? in 5-servers, means reading info @ to the lowest degree 3 servers , checked 1 newest version number?
if so, seems quite slow since need read 3 copies? how real world implement ?
clients should read leader. if node knows not leader should redirect client leader. if node not know leader should throw error , client should pick node @ random until told or finds leader. if node thinks leader unsafe homecoming read local state may have lost connectivity rest of cluster right when gets massive stall (cpu load, io stall, vm overload, big gc, background task, server maintenance job, ...) such looses leadership during replying client , gives out stale read. can avoided running round of (multi)paxos read.
lamport clocks , vector clock must pass messages assign operation happens before operation b when run on different machines. if not run concurrently. provides theoretic underpinning why cannot read leader not stale without exchanging messages bulk of cluster. message exchange establishes "happened-before" relationship of read next write (which may happen on new leader due failover).
the leader can acceptor , in 3 node cluster needs 1 response 1 other node finish round of (multi)paxos. can send messages in parallel , reply client when gets first response. network between nodes should dedicated intra-cluster traffic (and best can get) such not add together much latency client.
there reply describes how paoxs can used locking service cannot tolerate stale reads or reordered writes crash scenario discussed on @ some questions paxos locking service cannot have reads , writes locks "running concurrently" hence why round of (multi)paxos each client message strictly order reads , writes across cluster.
distributed consistency paxos
No comments:
Post a Comment