|
|
|
|
|
by tdrhq
681 days ago
|
|
Good catch! Snapshotting was certainly a bottleneck that I chose not to write about. But we aren't really taking the snapshot of RAM, instead we're running some code asking each object to snapshot itself into a stream. If you do this naively, it will block writes on the server until the snapshot is done (reads will continue to work). But Raft has a protocol for asynchronous snapshots. So in the first step we take an immutable fast snapshot of the state we care about which happens quickly, then writes can keep going while in the background we serialize the state to disk. |
|