# Write-Ahead Logging (WAL)

> What is Write-Ahead Logging (WAL) and how does it guarantee durability after a crash?

Canonical: https://www.internhack.in/learn/interview/database-design/db-write-ahead-logging-wal
Last updated: 2026-11-28

Difficulty: Advanced

## Question

What is Write-Ahead Logging (WAL) and how does it guarantee durability after a crash?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Write-Ahead Log, Durability, Crash Recovery, fsync, Log Sequence Number

Previous: [Fan-out Problem](https://www.internhack.in/learn/interview/database-design/db-fan-out-problem) · Next: [Read Replicas vs. Caching](https://www.internhack.in/learn/interview/database-design/db-read-replicas-vs-caching) · [All of Database Design](https://www.internhack.in/learn/interview/database-design)

## More Database Design questions

- [Full-Text Search](https://www.internhack.in/learn/interview/database-design/db-full-text-search-vs-like)
- [Checkpointing](https://www.internhack.in/learn/interview/database-design/db-checkpointing)
- [Star vs. Snowflake](https://www.internhack.in/learn/interview/database-design/db-star-vs-snowflake-schema)
- [Polymorphic Associations](https://www.internhack.in/learn/interview/database-design/db-polymorphic-associations)
- [Schema Migrations](https://www.internhack.in/learn/interview/database-design/db-database-migration-best-practices)
- [JSONB in SQL](https://www.internhack.in/learn/interview/database-design/db-json-b-data-type)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Database Design](https://www.internhack.in/learn/interview/database-design)
