Design an Object Storage Service With Buckets, Keys and Durable Blob Storage
Company: Waymo
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design an object storage service. Clients create named buckets and, inside a bucket, store, read, list and delete objects: opaque blobs of bytes addressed by a key, with a small amount of metadata such as size, content type and a checksum.
The round was given only as "design object storage", so establishing the scope and the numbers is part of the exercise.
```hint Two kinds of data
An object is a large blob plus a small record describing it. Ask whether both belong in the same storage system.
```
```hint Durability has a price
Compare what full copies and erasure coding cost in disk space, in repair traffic and in read latency before you pick one.
```
### Clarifying Questions
- What is the object size distribution: mostly small files, very large files, or both? Is there a maximum object size?
- What total capacity and what read and write request rates should the design target, and in how many regions?
- What durability and availability are expected?
- What consistency is required: must a read immediately after a successful write return the new object, and must a new object appear in listings immediately?
- Which features are in scope: overwrite, versioning, range reads, multipart upload of large objects, access control?
### What a Strong Answer Covers
- A minimal API (create bucket, put, get with ranges, delete, list by prefix) and the semantics of each call
- Separation of a metadata service (bucket and key to object location) from the data storage nodes
- Data placement and durability: replication or erasure coding, failure domains, checksums
- The write path, including when a put becomes visible, and the read path
- Handling of large uploads (chunking, multipart) and of many tiny objects
- Failure detection, background repair, and garbage collection of deleted or orphaned data
- Capacity estimates driven by the numbers agreed in clarification
### Follow-up Questions
- Most objects turn out to be a few kilobytes. What changes in the data layout?
- A disk holding part of a popular object fails during a spike in reads. Walk through what happens.
- How do you list a bucket with billions of keys by prefix, page by page?
- How would you add cross-region replication, and what consistency would readers in the second region see?
Overview: Design an object storage service where clients store, read, list and delete blobs by key inside buckets. Covers the API, separating metadata from data nodes, replication versus erasure coding, visibility on write, prefix listing, repair and garbage collection.