Segmented Log

Split log into multiple smaller files instead of a single large file for easier operations.


A single log file can grow and become a performance bottleneck as it is read at startup. Older logs are cleaned up periodically, but doing cleanup operations on a single huge file is difficult to implement.


Single log is split into multiple segments. Log files are rolled after a specified size limit.

for more details go to Chapter 04 of the online ebook at

This pattern is part of Patterns of Distributed Systems

23 November 2023