Design an In-Memory Object Manager with TTL

Last updated: August 30, 2026

Quick Overview

Design an in-memory object manager that supports CRUD operations and includes a time-to-live (TTL) feature for objects.

Airbnb
Software Engineering Fundamentals
Software Engineer
Airbnb
August 30, 2026
Software Engineer
Online Assessment
Software Engineering Fundamentals
Medium

1

0

17 solved


Design an in-memory object manager that supports CRUD operations and includes a time-to-live (TTL) feature for objects.

This question is typically asked during the online assessment round for software engineering roles at Airbnb to evaluate a candidate's ability to design and implement a data structure that efficiently manages in-memory data. The interviewer is looking for a clear understanding of object management, memory efficiency, and the ability to handle time-sensitive data through TTL functionality.

What the Interviewer Expects
  • Implement basic CRUD operations: create, read, update, and delete.
  • Incorporate TTL functionality to automatically expire objects.
  • Design an efficient data structure for fast access and modifications.
  • Handle edge cases, such as non-existent objects or fields.
  • Provide a clear explanation of the design choices and trade-offs.
Key Topics to Cover
Data Structures
Memory Management
TTL Implementation
CRUD Operations
Hash Tables
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How would you optimize the memory usage of your object manager?
  • What would you change if you needed to support distributed systems?
  • Can you explain how you would handle concurrency in this design?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

To design an in-memory object manager, we need to support the following functionalities:

  1. CRUD Operations: Create, Read, Update, and Delete objects identified by a unique object_id.
  2. **Field...
High-Level Design

The object manager can be implemented using a hash table where:

  • The key is the object_id and the value is another hash table containing field-value pairs.
  • Each object will also store a timestamp...

Submit Your Answer
Markdown supported

Related Questions