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
August 30, 20261
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
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- 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 ProblemsSample Answer
Requirements
To design an in-memory object manager, we need to support the following functionalities:
- CRUD Operations: Create, Read, Update, and Delete objects identified by a unique
object_id. - **Field...
High-Level Design
The object manager can be implemented using a hash table where:
- The key is the
object_idand the value is another hash table containing field-value pairs. - Each object will also store a timestamp...