← Amazon Interview Insights

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

Senior
Jun 2026

Summary

Amazon system design round for a software engineer role, one big open-ended question about building a GitHub-style developer community backend. The scope was wide enough that I kept second-guessing whether I was going too deep on one thing or not deep enough on another.

Questions Asked (5)

Q1

Design the backend for a GitHub-inspired developer community platform, covering user auth, social follow graph, posts with comments and likes, a home feed, and basic notifications.

System DesignTechnical Trade-offsData Modeling
Author's notes

The question sounds manageable until you realize how many sub-problems are hiding inside it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then propose a high-level architecture with clear separation of concerns (e.g., services for auth, social graph, posts, feed, notifications). Dive into data modeling and trade-offs for each component, emphasizing scalability, availability, and consistency choices aligned with Amazon's leadership principles.

Pro tip: Explicitly call out trade-offs (e.g., fan-out on write vs. read for the feed) and tie decisions to business needs like low-latency reads or cost efficiency. Mention how you'd evolve the design as scale grows, showing foresight.

1. Clarify Requirements and Scope

Ask questions to define core features, scale (users, posts, QPS), latency/consistency needs, and constraints. Prioritize must-haves vs. nice-to-haves.

2. High-Level Architecture

Sketch major components (API gateway, auth service, user service, social graph service, post service, feed service, notification service) and their interactions. Choose appropriate storage (SQL vs. NoSQL) per service.

3. Deep Dive into Data Modeling and APIs

Design schemas for users, follows, posts, comments, likes, and notifications. Define key API endpoints and data flows for posting, following, and fetching the feed.

4. Address Scalability and Trade-offs

Discuss partitioning, caching, fan-out strategies for the feed, and consistency models. Explain how to handle hot users, read-heavy workloads, and eventual consistency for notifications.

5. Wrap Up with Monitoring and Evolution

Mention observability, failure handling, and future improvements (e.g., ML-based ranking). Summarize key decisions and their rationale.

Key Points to Mention

  • Use of graph databases or adjacency lists for the social follow graph, with caching for frequent queries.
  • Feed generation strategies: fan-out on write (push) vs. fan-out on read (pull), and hybrid approaches for celebrities.
  • Data storage choices: SQL for user/auth data (ACID), NoSQL (e.g., DynamoDB) for posts and feeds (scale, flexibility).
  • Notification system design: message queues (e.g., SQS) for async processing, and push/pull mechanisms for delivery.
  • Caching layers (e.g., Redis) for hot data like feeds and user profiles to reduce latency.
  • Trade-offs between consistency and availability (CAP theorem) and how they apply to different features (e.g., likes vs. notifications).

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

Q2

How would you handle the data model and key indexes for this system, specifically for the feed and the follow graph?

Data ModelingSystem Design
Author's notes

I went with a pretty standard relational layout for users and follows, then proposed a separate feed table or cache layer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and access patterns (read-heavy feed, write-heavy follow graph) and the consistency requirements. Then propose a data model that separates the feed (e.g., fan-out on write with a timeline cache) from the follow graph (e.g., adjacency list with composite keys). Finally, detail the primary keys, secondary indexes, and sharding strategy to support efficient lookups and range scans.

Pro tip: Emphasize that index design must be driven by query patterns, not just data shape—show how you'd validate with back-of-the-envelope calculations and mention trade-offs like denormalization for read performance vs. write amplification.

1. Clarify requirements and access patterns

Ask about scale (users, follows, feed reads/writes per second), latency SLAs, and consistency needs (e.g., eventual consistency for feed). Identify the top queries: get feed for user, get followers/followees, check if A follows B.

2. Design the follow graph data model

Propose a table with composite primary key (follower_id, followee_id) to ensure uniqueness and support efficient lookups of who a user follows. Add a secondary index on (followee_id, follower_id) to answer 'who follows me' queries.

3. Design the feed data model

Use a timeline table keyed by (user_id, post_id) or (user_id, timestamp) to store precomputed feed entries. Consider fan-out on write for active users and fan-out on read for celebrities to balance write and read costs.

4. Define indexes and sharding strategy

For the follow graph, shard by follower_id to distribute writes; for the feed, shard by user_id to localize reads. Use secondary indexes (e.g., on post_id for likes/comments) and consider covering indexes to avoid extra lookups.

5. Discuss trade-offs and optimizations

Address hot partitions (e.g., celebrity followees), caching (Redis for feed), and denormalization (storing post metadata in feed). Mention how you'd handle deletes/unfollows and ensure idempotency.

Key Points to Mention

  • Composite primary keys for the follow graph (follower_id, followee_id) and a reverse index for followers lookup.
  • Feed storage as a materialized timeline with (user_id, post_id) or (user_id, timestamp) key for efficient range scans.
  • Sharding strategy: follow graph sharded by follower_id, feed sharded by user_id to distribute load.
  • Fan-out on write vs. fan-out on read trade-offs, especially for high-degree nodes (celebrities).
  • Use of caching (e.g., Redis) for hot feeds and denormalization to reduce joins.
  • Handling eventual consistency and idempotent writes for follow/unfollow and feed updates.

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

Q3

Walk through your API design for the core features: auth, posting, feed retrieval, and notifications.

API & IntegrationsSystem Design
Author's notes

Kept it high level, REST-style endpoints, talked through request and response shapes.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (scale, read/write ratio, consistency needs) before diving into each feature. Then walk through each API endpoint, covering HTTP methods, paths, request/response schemas, status codes, and key design decisions like authentication, pagination, and idempotency. Finally, discuss trade-offs and how the design supports Amazon's scale and operational excellence.

Pro tip: Emphasize idempotency and pagination for feed and notifications, and mention how you'd version APIs to avoid breaking changes—Amazon values backward compatibility and customer trust.

1. Clarify Requirements and Constraints

Ask about scale (users, QPS), read/write patterns, latency SLAs, and consistency requirements. This shows you don't jump to solutions without understanding the problem.

2. Design Auth API

Outline endpoints for sign-up, login, token refresh, and logout. Discuss token strategy (JWT vs. opaque), secure storage, and rate limiting.

3. Design Posting API

Define endpoints for creating, updating, and deleting posts. Cover request validation, idempotency keys, and media handling (e.g., pre-signed URLs).

4. Design Feed Retrieval API

Specify endpoints for fetching a user's feed with pagination (cursor-based), filtering, and sorting. Discuss caching and fan-out strategies for scalability.

5. Design Notifications API

Describe endpoints for listing, marking as read, and managing notification preferences. Include push vs. pull models and delivery guarantees.

Key Points to Mention

  • Use RESTful conventions with clear resource naming and HTTP methods, or justify GraphQL if appropriate.
  • Implement cursor-based pagination for feed and notifications to handle large datasets efficiently.
  • Ensure idempotency for POST/PUT operations using idempotency keys to prevent duplicate actions.
  • Secure APIs with OAuth 2.0 / JWT, and enforce rate limiting and input validation.
  • Design for scalability: consider caching, async processing (e.g., SQS for notifications), and database sharding.
  • Version APIs (e.g., /v1/) and provide clear error responses with standard HTTP status codes.

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

Q4

How would you scale this system for high read volume on the feed, and what failure modes concern you most?

System DesignTechnical Trade-offs
Author's notes

This is where I felt most comfortable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and read/write ratio, then propose a layered caching and read-replica strategy to handle high read volume. Discuss specific failure modes like cache stampedes, hot keys, and replica lag, and explain how you'd mitigate them with techniques like request coalescing and circuit breakers.

Pro tip: Tie every scaling decision back to a measurable trade-off (e.g., consistency vs. latency) and mention how you'd monitor and alarm on the failure modes you identify, showing operational maturity.

1. Clarify requirements and constraints

Ask about expected read QPS, data size, latency SLOs, and consistency requirements to ground your design in realistic numbers.

2. Design the read scaling architecture

Propose a multi-layer approach: CDN for static assets, application-level caching (e.g., Redis) for feed data, and read replicas for the database to distribute load.

3. Identify failure modes

Enumerate critical failure scenarios such as cache stampede, hot keys, replica lag, cache penetration, and network partitions, and explain their impact.

4. Mitigate and monitor

Describe mitigation strategies (e.g., request coalescing, cache warming, circuit breakers, fallbacks) and how you'd monitor and alert on these failures.

5. Summarize trade-offs

Conclude by discussing the trade-offs between consistency, availability, and latency, and how you'd iterate based on metrics.

Key Points to Mention

  • Caching strategies (e.g., write-through, read-through, TTL, LRU eviction)
  • Database read replicas and eventual consistency implications
  • Cache stampede/thundering herd and request coalescing
  • Hot key mitigation via sharding or local caching
  • Circuit breakers and graceful degradation
  • Monitoring and alerting on cache hit rate, replica lag, and error rates

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

Q5

What should be strongly consistent versus eventually consistent in this system, and why?

System DesignTechnical Trade-offs
Author's notes

Answered that auth and follow-state changes need to be strongly consistent because acting on stale follow data could cause real user-facing bugs.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's core requirements and user expectations, then map data entities to consistency needs based on business impact and access patterns. For each entity, justify strong vs. eventual consistency by weighing correctness, latency, availability, and cost trade-offs, and propose a hybrid approach where appropriate.

Pro tip: Anchor your answer in Amazon's leadership principles: insist on the highest standards for correctness where it matters (e.g., payments), but bias for action and frugality elsewhere by embracing eventual consistency to scale. Always quantify the impact of inconsistency (e.g., 'a stale like count is acceptable, but a double-charged customer is not').

1. Clarify system goals and constraints

Ask about the system's purpose, scale, latency SLAs, and user expectations to ground consistency decisions in real requirements.

2. Identify critical data and operations

List the main entities and transactions (e.g., orders, inventory, user profiles, analytics) and classify them by business impact if inconsistent.

3. Assign consistency models with rationale

For each entity, choose strong or eventual consistency and explain why, referencing trade-offs like CAP theorem, latency, and cost.

4. Propose a hybrid architecture

Describe how to combine both models (e.g., strong for writes, eventual for reads via caching or read replicas) and handle edge cases like conflict resolution.

5. Validate with failure scenarios

Walk through what happens during network partitions or node failures to show your choices maintain correctness where needed and availability elsewhere.

Key Points to Mention

  • CAP theorem and the trade-off between consistency and availability under partition
  • Strong consistency for financial transactions, inventory decrements, and unique constraints (e.g., username registration)
  • Eventual consistency for social feeds, product reviews, recommendation engines, and analytics dashboards
  • Use of quorum reads/writes (e.g., Dynamo-style) or consensus protocols (e.g., Paxos/Raft) for strong consistency
  • Techniques to manage eventual consistency: idempotency, versioning, conflict-free replicated data types (CRDTs), and read-your-writes sessions
  • Business impact analysis: cost of inconsistency vs. latency/availability gains, aligned with Amazon's customer obsession

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