Gunjan Sharma

Writing

Blogs

Long-form essays on distributed systems, blockchain architecture, security, and the craft of building reliable software. I write to think clearly.

MongoDB TTL Internals: Expiration, Background Deletion, Self-Destructing Data and the Limits of Time

This technical article explores the internal behaviour of MongoDB Time To Live (TTL) indexes, focusing on how expired documents are identified, processed, and deleted by the background TTL Monitor. It examines the computational complexity of indexed expiration, deletion batching, background scheduling, storage-engine implications and the distinction between expiration eligibility and physical deletion. The article also explores an alternative approach to data lifecycle management through time-based storage segmentation, discussing when collection-level retirement may be more efficient than individual document deletion.

What is Ultimate Reality?

Attempting to know "Ultimate Reality" through human language is mathematically equivalent to asking: "What is the exact numerical length of infinity?