Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Server Logic
1. 1: Server 101 receives a “Create Thread” write request C Server 101 Rw Server 301 Server 201
2. 2: Server 101 assigns it threadID of 1101 and writes it to its store 1101 C Server 101 Server 301 Server 201
3. 3: Server 101 chooses a backup server (least loaded or random if equal load) and requests a backup write 1101 C Server 101 Rb: 1101 Server 301 Server 201
4. 4: Server 201 writes the data to its store as a backup 1101 C Server 101 Server 301 Server 201 1101
5. 5: Server 201 receives a “Create Thread” write request, writes it to store, sends a backup request to next highest ID, who in turn writes it to store (ie, process repeated) 1101 C Server 101 Rw Server 301 Server 201 1201 1101 1201 Rb: 1201
6. 6: Server 101 recieves a read request for Thread 1101. Data is fetched from it’s own store, and returned. 1101 C Server 101 Server 301 Server 201 1201 1101 1201
7. 7: Server 101 recieves a read request for Thread 1201. Request is forwarded to Server 201, data is returned and passed back on to client 1101 C Server 101 Server 301 Server 201 1201 1101 1201
8. 8: Server 201 dies. 1101 C Server 101 Server 301 Server 201 1201 1101 1201
9. 9: Server 101 receives a read request for 1201. It attempts to retrieve the data from Server 201, but gets nowhere as Server 201 is down. 1101 C Server 101 Rw 2101 Server 301 Server 201 1201 1101 1201
10. 10: Server 101 sends a request to other known servers for Server 201’s backup. It gets the data from there, and until 201 reinstates, it uses the new server as a 201 source. 1101 C Server 101 Rw 2101 Server 301 Server 201 1201 1101 1201
11. 11: Server 101 receives a write request. It writes it to its own store (as 2101) and attempts to send a backup request to Server 201. 1101 2101 C Server 101 Rw Rb: 2101 Server 301 Server 201 1201 1101 1201
12. 12: Server 101 chooses a second backup server (least loaded), and backup request like usual. Thread is written in new server, like before. 1101 2101 C Server 101 Rw Rb: 2101 Server 301 Server 201 1201 2101 1101 1201
13. 12: Server 201 recovers. Server 101 notices, and requests that Server 301 (temporary backup) move its backup back to Server 201. 1101 2101 C Server 101 Rm Server 301 Server 201 1201 1101 1201 2101