← Amazon Interview Insights

Amazon·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Amazon system design round focused entirely on building a configuration service from scratch. It went deep fast, covering everything from basic API design to distributed fan-out and rollback semantics. Not a casual question.

Questions Asked (7)

Q1

Design a configuration service that lets applications set and get config values, subscribe to specific keys or namespaces, and receive notifications when values change. Define the API surface including set, get, subscribe, and unsubscribe.

System DesignAPI & Integrations
Author's notes

I started with the API shape which felt natural, but I underestimated how much they'd push on subscription granularity.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then define a clean API surface with set, get, subscribe, and unsubscribe operations. Discuss the data model, consistency, and notification mechanisms, and finally address scalability, fault tolerance, and trade-offs.

Pro tip: Demonstrate Amazon leadership principles by proactively discussing operational excellence: how you'd monitor, version, and safely deploy changes to the configuration service itself, and how you'd handle failure modes like notification storms or stale reads.

1. Clarify Requirements and Scope

Ask questions to understand scale (reads/writes per second, number of keys, subscribers), consistency needs (strong vs eventual), latency requirements, and multi-tenancy. Confirm whether config values are simple strings or structured, and if versioning/history is needed.

2. Define API Surface

Specify method signatures for set(key, value), get(key), subscribe(keyOrNamespace, callback), and unsubscribe(subscriptionId). Include parameters like namespace, version, and options for consistency or TTL. Discuss error handling and idempotency.

3. Design Data Model and Storage

Choose a storage layer (e.g., key-value store like DynamoDB) with a schema that supports namespaces, versioning, and efficient lookups. Consider caching for low-latency reads and a change log for audit and replay.

4. Design Notification Mechanism

Implement a publish-subscribe system (e.g., using SNS, Kafka, or WebSockets) to notify subscribers of changes. Ensure at-least-once delivery, handle subscriber failures, and avoid notification storms via batching or rate limiting.

5. Address Scalability, Consistency, and Fault Tolerance

Discuss partitioning by namespace/key, replication for availability, and consistency models (e.g., eventual consistency with read-your-writes). Cover failure scenarios like network partitions, service outages, and how to recover.

Key Points to Mention

  • API design principles: clear naming, idempotency, error codes, and versioning of the API itself.
  • Consistency models: trade-offs between strong and eventual consistency, and how to achieve read-your-writes for subscribers.
  • Notification delivery guarantees: at-least-once vs exactly-once, handling duplicates, and ordering of updates.
  • Scalability: partitioning strategies, caching, and load balancing for high read throughput.
  • Security: authentication, authorization, and encryption of config values in transit and at rest.
  • Operational concerns: monitoring, logging, alerting, and safe deployment of the service itself.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

What are the notification semantics for your config service? Specifically, how do you handle at-least-once vs at-most-once delivery, message ordering, and whether to debounce rapid successive changes?

System DesignTechnical Trade-offs
Author's notes

This is where I got a bit turned around.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of the config service, such as consistency needs and client expectations. Then, discuss the trade-offs between at-least-once and at-most-once delivery, explain how you would handle ordering and debouncing, and justify your choices based on the use case. Emphasize idempotency and versioning to manage duplicates and out-of-order messages.

Pro tip: Tie your answer to Amazon's leadership principles, such as Customer Obsession and Ownership, by explaining how your design ensures reliability and minimizes customer impact. Also, mention real-world examples like AWS AppConfig or DynamoDB Streams to show practical awareness.

1. Clarify Requirements

Ask questions to understand the config service's use case, consistency requirements, and client tolerance for stale or duplicate notifications.

2. Choose Delivery Semantics

Decide between at-least-once and at-most-once delivery based on whether missing a notification is worse than receiving duplicates. Typically, at-least-once is preferred for config changes to ensure eventual consistency.

3. Handle Ordering and Duplicates

Use version numbers or timestamps to detect and discard stale or out-of-order messages. Ensure idempotent processing on the client side to handle duplicates gracefully.

4. Implement Debouncing

Debounce rapid successive changes to reduce notification storms, but balance latency and freshness. Consider client-side or server-side debouncing with a short window (e.g., 100ms).

5. Discuss Trade-offs and Alternatives

Explain the trade-offs of your choices, such as increased complexity for exactly-once semantics, and mention alternatives like long polling or push notifications with backoff.

Key Points to Mention

  • At-least-once vs at-most-once delivery: trade-offs between reliability and duplicates
  • Idempotency and versioning to handle duplicates and out-of-order messages
  • Message ordering: use of sequence numbers or timestamps to ensure correct order
  • Debouncing: reducing notification frequency while maintaining acceptable latency
  • Client-side vs server-side debouncing and its impact on system design
  • Real-world examples: AWS AppConfig, DynamoDB Streams, or SNS/SQS for notification patterns

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would your config service handle versioning, rollbacks, and partial failures during a config update?

System DesignTechnical Trade-offs
Author's notes

Versioning I had decent answers for, basically monotonic version counters per key.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of the config service, then propose a versioned, immutable configuration store with atomic updates and rollback capabilities. Explain how you would handle partial failures using techniques like canary deployments, health checks, and automatic rollback, while ensuring consistency and availability.

Pro tip: Emphasize idempotency and observability: make config updates idempotent and include detailed metrics/logging so you can detect and recover from partial failures quickly. Also, mention that you would design for failure by assuming updates can fail and planning rollback strategies upfront.

1. Clarify Requirements and Constraints

Ask questions to understand the scale, consistency needs, and failure tolerance of the config service. This shows you don't jump to solutions without context.

2. Design for Versioning and Immutability

Propose storing each config version as an immutable snapshot with a unique version ID. This enables easy rollbacks and auditability.

3. Implement Atomic Updates and Rollbacks

Describe how updates are applied atomically across the fleet, using a two-phase commit or a version pointer swap. Rollbacks simply point to a previous version.

4. Handle Partial Failures

Explain strategies like canary deployments, health checks, and automatic rollback on failure. Ensure that partial failures don't leave the system in an inconsistent state.

5. Ensure Observability and Recovery

Mention monitoring, logging, and alerting for config changes. Include automated recovery mechanisms and manual override options.

Key Points to Mention

  • Versioning: immutable snapshots, version IDs, audit trails
  • Rollbacks: atomic pointer swap, previous version retrieval, rollback triggers
  • Partial failures: canary deployments, health checks, automatic rollback, idempotency
  • Consistency: eventual vs strong consistency, trade-offs
  • Observability: metrics, logging, alerting for config changes
  • Failure recovery: automated and manual rollback procedures

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How do you ensure thread safety and handle concurrency in the config service?

System DesignAlgorithms & Data Structures
Author's notes

Went with read-write locks for the in-memory store, talked about optimistic locking for writes with version checks.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the config service's read/write patterns and consistency requirements, then propose a layered concurrency strategy using immutable snapshots and atomic reference swaps for reads, and fine-grained locking or optimistic concurrency for writes. Discuss how you'd handle distributed consistency with versioning and conflict resolution, and mention monitoring and testing for race conditions.

Pro tip: Emphasize that most config reads should be lock-free and that writes are rare, so you can optimize for read scalability while ensuring write safety through versioned updates and atomic swaps. Also, mention how you'd handle cache invalidation and propagation across nodes to avoid stale reads.

1. Clarify requirements and constraints

Ask about read/write ratio, consistency needs (strong vs eventual), latency SLAs, and scale (number of nodes, config size). This shapes your concurrency approach.

2. Design for read-heavy, lock-free access

Use immutable configuration objects and atomic references (e.g., AtomicReference in Java) so readers always see a consistent snapshot without locking. Cache configs locally with version checks.

3. Ensure safe writes with versioning and atomic swaps

Serialize writes per config key using fine-grained locks or optimistic concurrency (CAS). Validate and build a new immutable config, then atomically swap the reference. Use version numbers to detect conflicts.

4. Handle distributed consistency and propagation

Use a consensus protocol (e.g., Raft) or a centralized store (e.g., DynamoDB with conditional writes) for durability. Propagate updates via pub/sub or polling with version checks, ensuring eventual consistency across nodes.

5. Test and monitor for concurrency issues

Write stress tests with concurrent readers/writers, use tools like Jepsen for distributed correctness, and monitor for stale reads, contention, and update latency. Log version mismatches and conflicts.

Key Points to Mention

  • Immutable configuration objects and atomic reference swapping for lock-free reads
  • Versioning and optimistic concurrency control (CAS) for writes
  • Fine-grained locking or per-key locks to reduce contention
  • Distributed consensus or conditional writes for durability and consistency
  • Cache invalidation and propagation strategies (pub/sub, polling with versions)
  • Testing for race conditions and monitoring for stale reads and contention

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How would you handle persistence and backup for the configuration data, and what access control mechanisms would you put in place?

System DesignData Modeling
Author's notes

I talked about snapshotting to durable storage periodically plus a write-ahead log for recovery.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements for the configuration data (e.g., size, read/write patterns, consistency needs) and then propose a storage solution that balances durability, availability, and cost. For persistence, discuss using a managed database with multi-AZ replication and point-in-time recovery, and for backup, outline a versioned, automated backup strategy with cross-region replication. For access control, describe a layered approach using IAM roles, resource policies, and encryption with KMS, emphasizing least privilege and auditability.

Pro tip: Tie your answer to Amazon's leadership principles, such as 'Insist on the Highest Standards' and 'Dive Deep', by explaining how your choices ensure data durability and security, and mention trade-offs you considered (e.g., cost vs. durability).

1. Clarify Requirements

Ask about the scale, read/write ratio, consistency requirements, and recovery objectives (RPO/RTO) for the configuration data. This shows you don't jump to solutions without understanding the problem.

2. Design Persistence

Propose a durable storage solution, such as a managed relational database (e.g., Amazon RDS) or a key-value store (e.g., DynamoDB) with multi-AZ replication. Explain how it meets the requirements and handles failures.

3. Implement Backup Strategy

Describe automated backups with point-in-time recovery, versioning, and cross-region replication for disaster recovery. Mention retention policies and how to restore quickly.

4. Define Access Control

Outline IAM policies, roles, and resource-based policies to enforce least privilege. Include encryption at rest and in transit, and audit logging with CloudTrail.

5. Discuss Trade-offs and Monitoring

Acknowledge trade-offs (e.g., cost, complexity) and explain how you would monitor and alert on backup failures or unauthorized access attempts.

Key Points to Mention

  • Multi-AZ replication for high availability and durability
  • Automated backups with point-in-time recovery and cross-region replication
  • Versioning of configuration data to track changes and enable rollback
  • IAM roles and policies with least privilege, including resource-based policies
  • Encryption at rest (KMS) and in transit (TLS)
  • Audit logging with AWS CloudTrail and monitoring with CloudWatch

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you scale this config service to thousands of clients? Walk through your fan-out strategy, caching approach, and your choice between long polling and WebSockets for client communication.

System DesignTechnical Trade-offs
Author's notes

Best part of the interview for me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (number of clients, update frequency, latency tolerance) and then propose a scalable architecture with a fan-out layer (e.g., pub/sub) and caching (e.g., CDN or Redis). Compare long polling and WebSockets based on trade-offs like server resource usage, latency, and client constraints, and justify your choice with metrics.

Pro tip: Quantify the trade-offs: e.g., WebSockets maintain persistent connections but require more server resources, while long polling is simpler but can introduce latency. Show you can calculate capacity and cost implications.

1. Clarify Requirements

Ask about scale (thousands of clients), update frequency, latency requirements, and client types (browser, mobile, server). This shows you avoid premature optimization.

2. Design Fan-Out Strategy

Propose a pub/sub system (e.g., Kafka, SNS) to decouple config updates from clients, and use a fan-out service (e.g., API Gateway, custom service) to distribute updates efficiently.

3. Implement Caching

Use multi-level caching: CDN for static configs, Redis for dynamic configs, and client-side caching with TTL/versioning to reduce load and latency.

4. Choose Communication Protocol

Compare long polling vs WebSockets: long polling is simpler and works with HTTP/1.1 but has higher latency and overhead; WebSockets offer real-time, bidirectional communication but require connection management. Choose based on requirements.

5. Address Scalability and Reliability

Discuss horizontal scaling, load balancing, connection draining, and fallback mechanisms (e.g., fallback to polling if WebSockets fail).

Key Points to Mention

  • Pub/sub pattern for decoupling and scalability
  • Multi-level caching (CDN, Redis, client-side) with invalidation strategies
  • Long polling vs WebSockets trade-offs: latency, server resources, compatibility
  • Connection management for WebSockets (heartbeats, reconnection, scaling)
  • Use of versioning/ETags for efficient config updates
  • Monitoring and metrics to ensure performance and reliability

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

What is the time and space complexity of the core operations in your config service, specifically get, set, and subscribe?

Algorithms & Data StructuresSystem Design
Author's notes

Blanked for a second on subscribe because the complexity depends heavily on how you index subscriptions.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the data structures and algorithms used for get, set, and subscribe in your config service. Then, for each operation, state the average and worst-case time complexity and the space complexity, explaining the trade-offs and how they meet Amazon's scale and performance requirements.

Pro tip: Emphasize that complexity analysis must consider concurrency and distributed system factors, such as locking, replication, and consistency models, which can affect real-world performance beyond Big-O notation.

1. Clarify the implementation

Briefly describe the data structures and algorithms used for get, set, and subscribe (e.g., hash map, tree, pub/sub system) to set the context for complexity analysis.

2. Analyze get operation

State the time complexity (average and worst-case) and space complexity for get, explaining factors like indexing, caching, and data structure choice.

3. Analyze set operation

State the time and space complexity for set, including any overhead from persistence, replication, or locking mechanisms.

4. Analyze subscribe operation

State the time and space complexity for subscribe, considering the number of subscribers, notification mechanisms, and data structures for managing subscriptions.

5. Discuss trade-offs and optimizations

Explain how the complexities impact scalability and performance, and mention any optimizations or design choices that mitigate bottlenecks.

Key Points to Mention

  • Average vs. worst-case time complexity for each operation
  • Space complexity including auxiliary data structures and overhead
  • Impact of concurrency control (e.g., locks, MVCC) on complexity
  • Scalability considerations for distributed systems (e.g., sharding, replication)
  • Trade-offs between different data structures (e.g., hash map vs. balanced tree)
  • How subscribe handles multiple subscribers and notification efficiency

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.