InterviewSolution
| 1. |
Explain How Cassandra Writes? |
|
Answer» CASSANDRA writes first to a commit log on disk for durability then commits to an inmemory structure called a memtable. A write is successful once both commits are complete. Writes are batched in memory and WRITTEN to disk in a table structure called an SSTable (sorted string table). Memtables and SSTables are created per column FAMILY. With this design Cassandra has minimal disk I/O and offers high speed write performance because the commit log is appendonly and Cassandra doesn’t seek on writes. In the event of a fault when writing to the SSTable Cassandra can SIMPLY REPLAY the commit log. Cassandra writes first to a commit log on disk for durability then commits to an inmemory structure called a memtable. A write is successful once both commits are complete. Writes are batched in memory and written to disk in a table structure called an SSTable (sorted string table). Memtables and SSTables are created per column family. With this design Cassandra has minimal disk I/O and offers high speed write performance because the commit log is appendonly and Cassandra doesn’t seek on writes. In the event of a fault when writing to the SSTable Cassandra can simply replay the commit log. |
|