Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> periodically just take a snapshot of everything in RAM.

Sound similar to `stop the world Garbage collection` in Java. Does your entire processing comes to halt when you do this? How frequently do you need to take snapshots? Or do you have a way to do this without halting everything



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: