-
I want to build a completely in memory cluster but I am not clear about the snapshot mechanisms. I understand that they are there to compact the log, however, they must still take up space. Won't a long running service eventually run out of memory? Do these snapshots ever get purged from the audit log? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There are two audit logs supported out-of-the-box:
Persistent log is highly optimized for disk I/O, parallel reads, in-memory cache for fast lookup and many other things. Of course, you need to configure it according with your needs. The default implementation cannot understand the semantics of the custom log entries. Without this knowledge it cannot construct snapshots automatically. However, it provides extensibility point which gives you opportunity to implement interpreter of the log entries and explain semantics of them to the persistent log. In this case, snapshots become possible. Let's assume that your log contains the following records:
We can compress such log as follows:
I recommend you to inspect example of Raft-based cluster which is available in my repo. The sample project contains everything you need:
Here is a cookbook for persistent storage. |
Beta Was this translation helpful? Give feedback.
There are two audit logs supported out-of-the-box:
Persistent log is highly optimized for disk I/O, parallel reads, in-memory cache for fast lookup and many other things. Of course, you need to configure it according with your needs. The …