Design a configuration subscription service
Company: Amazon
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design a configuration service/class that supports setting configuration values and allows applications to subscribe to specific keys or namespaces. When a value changes, subscribers must be notified promptly. Specify the API (set, get, subscribe, unsubscribe), notification semantics (at-least-once vs at-most-once, ordering, debouncing), and how to handle versioning, rollbacks, and partial failures. Address thread safety, concurrency control, persistence/backup, and access control. Discuss how you would scale to thousands of clients (fan-out strategy, caching, long polling vs WebSocket), and analyze time/space complexity of core operations.
Quick Answer: This question evaluates skills in designing a distributed configuration and subscription service, covering API design, real-time notification semantics (delivery and ordering guarantees), versioning, concurrency and thread-safety, durability and recovery, multi-tenant isolation, security, and scalability concerns.