AITeky Learn

AiTeky Original Interactive Learning & Practice Advanced

Wide-column stores: partitions, replicas and the write path

Design tables around the question you will ask, see how a partition key places data on servers, choose how many replicas must answer, watch writes flow through a log-structured store, and size partitions for a busy messaging app.

A wide-column store such as Cassandra is built for one situation: enormous amounts of data, constant writes, and the need to stay up even when servers fail. It gives up joins and free-form queries to get that. You decide in advance which questions the data must answer, and you lay the data out so each question reads from one place.

Here the pieces are small Python programs, so you can see how the data is placed, copied and written. The product's real commands and defaults differ in detail; check its own documentation. All the traffic and sizes are made up.

  • Learn lessons explain one idea at a time and let you run it.
  • Industry ready lessons decide and justify, and end with interview questions.

You should know basic Python and the idea of a table with rows and columns. The key-value course is a good warm-up.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 35 min Free sample 🔒 AiTeky Pass Partitions and query-first design Place rows on four servers by hashing a partition key, store the rows of one partition sorted by a clustering column, read one partition in a single step, and see why a table built for one question cannot answer another without a second table.
  2. 02 35 min 🔒 AiTeky Pass Replicas and quorum: staying up and still being right Keep three copies of every row, let servers fail, and see why writing to a majority and reading from a majority always finds the newest value, while writing to one and reading from one can return an old value.
  3. 03 35 min 🔒 AiTeky Pass The write path: memtable, sstables and compaction Build a small log-structured store where writes go to memory and a log, flush into sorted immutable files, and reads check the newest file first, then see how many files a read must check grow, and how compaction and deletes with tombstones bring it back down.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 04 40 min 🔒 AiTeky Pass On the job: partition design for a messaging app A chat app stores every message and shows the latest 50 of a conversation. Compare three partition designs by how big the biggest partition grows and how many partitions a screen reads, pick one, and write the design note for the platform team.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in