Database/Distributed Systems

Lecture 4: Primary-Backup Replication

Tony Lim 2022. 2. 11. 16:17
728x90

state transfer = primary send what ram is storing to backup (replica) 

replicated state machine = send operation from client not memory , primary and backups are executing operation same time

 

primary fails -> cut-over ==  client knows it need to send request to backup

even with replicated state machine when replica fails and we need to create new replica , we need to use state transfter and send full state to new replica

 

Vmware Fault Tolerence

client send request to primary -> primary(VMM) copy that packet and send to backup

when primary dies backup "goes live" == doesn't wait for primary's copied packet and backup get directly input from client

 

 

non deterministic events that can happen => we want to execute exactly same at primary and backup even with non deterministic events

client's input goes to primary or backup OS -> interrupt happens at some point of instruction

weird instruction = random number generator , getting process id ... primary and backup process id can be different 

muticore = instructions will interleaved at some point and may end up with different result at primary and backup

 

log sends = #instruction , result data (to fake) 

#instruction is used to emulate the same sequnece of instruction to happen at primary and backup

 

 

Output Rule

after sending result that we incremented succssfully to 11 but then primary went down and log server( to replica ) went down

replica is now 10 and act as primary -> get another request -> replica sends it is now 11 -> inconsistency occured

with output rule we just wait until log get sended to succussfully to replica then VM monitor release output to client

 

primary cannot send log to replica due to network issue == both of them alive but they are going seperately

Test and Set == both of them will think that other one is dead , but actally they are not so by using test and set we choose which one of them are going to be alive (First-come, first-served basis)

 

 

 

 

 

728x90