Versioned object store with lifecycle
Your task
Design a versioned object store (S3-versioning style) where every overwrite or delete creates a new version rather than destroying data, and customers attach lifecycle policies such as 'expire noncurrent versions after 30 days' or 'transition objects to cold storage after 90 days.' Buckets hold billions of objects, objects range from 1KB to 5GB, and reads dominate writes 50:1. How do you store versions and enforce lifecycle rules at this scale?
It covers
- Versioning
- Lifecycle policy
- Soft delete