Skip to content
Ameen Abozaid
Planned lessonMID-039-L03

Write-behind

  • Lesson 3 of 5
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

understand why write-behind is risky and when it is acceptable.

Planned topics

  • Write-behind: write to the cache, return immediately, persist to the database later in batches.
  • Gains: very fast writes, batching, absorbs spikes.
  • Risk: if the cache or node dies before the flush, the writes are lost; ordering and failures become hard.
  • Acceptable only for data you can lose or rebuild: view counters, last-seen timestamps, analytics. Never for orders or payments.
Draft outline details

Demonstration

timeline: write at 10:00:00 acknowledged, flush at 10:00:05, crash at 10:00:03: write lost.

Check your understanding

Why not use write-behind for orders?

Show answer

An acknowledged order could be lost before it reaches the database.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.