What makes CommitLog faster than writing to SSTable in Cassandra?
I am currently studying Cassandra in depth as I am ready to specialize in her. I stumbled upon Cassandra's "write path" and am now trying to understand Commit Logs. As I understand it, the entry is committed when it is written to the Commit Log, first and then to the MemTable (An in the memory table). But, if the commit logs are written to FILE SYSTEM, since SSTables. What a magical thing to do to commit logs faster or as stated in many posts and docs.
A write is considered successful after it has been written to the commit log and memory, so there is very little I / O on disk while writing
Why isn't it written for SSTable and MemTable which are considered successful?
source to share
SSTables are immutable, so adding to them would not be possible. Therefore, records are sent both to memory and to the commit log (for durability). During normal operations, memtable is periodically flushed to disk as an SSTable, after which it is compacted with existing SSTables to make reading more efficient. The commit log is only replayed when the node is rebooted to recover entries that were not flushed to SSTables.
source to share
SSTables are created based on dropped memtables. While commits are updated periodically, memtable does not reset. This is due to the fact that the first time, before writing to disk, you must first click on a certain soz (i.e. Size). This ensures that the generated sstable is large enough for efficient management. In case the memtables flicker periodically a couple of times a minute, we might end up with a bunch of tiny sstables that need to be compressed again.
source to share