← LinkedIn Interview Insights

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

Senior
Jun 2026

Summary

LinkedIn system design round for a software engineer role, basically a deep dive into building a calendar product at massive scale. The scope was enormous and I felt like I was constantly playing catch-up trying to cover everything they wanted.

Questions Asked (8)

Q1

Design a multi-tenant calendar system that supports hundreds of millions of users, covering events, attendees, invitations, reminders, recurring rules, time zones, shared calendars, and access control.

System DesignData ModelingTechnical Trade-offs
Author's notes

The question is basically 'design Google Calendar but justify every decision.' I started with the data model because that felt most concrete, but the interviewer kept pulling me toward scalability before I'd even finished the schema.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a high-level architecture that separates concerns: event storage, scheduling, notification, and access control. Dive into data modeling for recurring events and time zones, and discuss trade-offs in consistency, partitioning, and caching.

Pro tip: Emphasize how you handle recurring events efficiently by storing recurrence rules and expanding instances on-demand, rather than precomputing all occurrences. Also, discuss how you'd shard data by user or calendar to achieve horizontal scalability.

1. Clarify Requirements and Scale

Ask about expected read/write patterns, consistency needs, and features like real-time updates. Confirm scale: hundreds of millions of users, billions of events.

2. High-Level Architecture

Outline core services: API gateway, calendar service, event service, notification service, and storage layers. Discuss partitioning and replication strategies.

3. Data Modeling

Design schemas for users, calendars, events, attendees, and recurrence rules. Address time zone handling and indexing for efficient queries.

4. Recurring Events and Reminders

Explain how to store recurrence rules (e.g., RRULE) and generate instances on-the-fly. Describe reminder scheduling using a distributed job queue.

5. Access Control and Sharing

Define permission models (ACLs) for shared calendars and events. Discuss how to enforce access control at scale with caching.

Key Points to Mention

  • Sharding strategy: partition by user ID or calendar ID to distribute load.
  • Time zone handling: store events in UTC and convert to local time zones for display.
  • Recurring events: use RRULE (iCalendar standard) and expand instances dynamically.
  • Reminders: use a scalable scheduler like a distributed cron or message queue with delayed delivery.
  • Access control: implement role-based access control (RBAC) or ACLs with efficient caching.
  • Trade-offs: consistency vs. availability, precomputation vs. on-demand expansion, and caching strategies.

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

Q2

Define the REST or gRPC API surface for this calendar system, including endpoints for creating and updating events, listing events in a time range, inviting attendees, RSVP handling, searching, and managing calendar shares. How do you handle idempotency, pagination, and rate limiting?

API & IntegrationsSystem DesignTechnical Trade-offs
Author's notes

I actually felt decent about this part.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and choosing REST or gRPC based on client needs, then define resource-oriented endpoints for core operations. Explicitly address idempotency, pagination, and rate limiting with concrete mechanisms, and discuss trade-offs.

Pro tip: Demonstrate maturity by acknowledging that idempotency and pagination are often afterthoughts that cause production issues; propose idempotency keys for writes and cursor-based pagination for lists from the start.

1. Clarify Requirements and Choose Protocol

Ask about clients (web, mobile, third-party), expected scale, and consistency needs. Choose REST for simplicity and broad compatibility, or gRPC for performance and streaming; justify your choice.

2. Define Core Resource Endpoints

Outline RESTful endpoints for events (POST /events, PATCH /events/{id}), listing (GET /events?start=...&end=...), attendees (POST /events/{id}/attendees), RSVP (PUT /events/{id}/attendees/{userId}/rsvp), search (GET /events/search?q=...), and shares (POST /calendars/{id}/shares).

3. Address Idempotency

Explain how to make write operations idempotent: use client-generated idempotency keys for POST requests, and design PUT/PATCH to be naturally idempotent. Discuss storing keys with TTL and returning the same response for duplicates.

4. Implement Pagination and Rate Limiting

For pagination, use cursor-based pagination (e.g., ?pageToken=...) for large, changing datasets like event lists. For rate limiting, describe token bucket or sliding window algorithms, and where to enforce (API gateway vs. service).

5. Discuss Trade-offs and Edge Cases

Highlight trade-offs: REST vs. gRPC, cursor vs. offset pagination, strict vs. eventual consistency for RSVPs, and rate limiting granularity (per user, per IP). Mention error handling and versioning.

Key Points to Mention

  • Idempotency keys for POST requests to prevent duplicate event creation or invites
  • Cursor-based pagination for listing events in a time range to handle large datasets efficiently
  • Rate limiting strategies (token bucket, sliding window) and where to enforce them (API gateway, service mesh)
  • REST vs. gRPC trade-offs: REST for simplicity and caching, gRPC for performance and streaming
  • Consistency models for RSVP handling (e.g., eventual consistency vs. strong consistency)
  • API versioning and error handling (e.g., 429 for rate limits, 409 for conflicts)

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

Q3

Walk through the relational schema for this system. What tables do you need, what are the primary and foreign keys, and how do you handle soft deletes and audit fields?

Data ModelingTechnical Trade-offs
Author's notes

Drew out Users, Calendars, Events, Attendees, RecurrenceRules, and an Exceptions table.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's core entities and relationships, then walk through the schema table by table, explaining primary keys, foreign keys, and normalization choices. Explicitly address soft deletes and audit fields, discussing trade-offs like query complexity vs. data retention and how they impact indexing and performance.

Pro tip: Mention that soft deletes require careful handling in unique constraints and queries (e.g., partial indexes on `deleted_at IS NULL`), and that audit fields should be immutable and set via triggers or application logic to ensure consistency.

1. Clarify requirements and entities

Ask clarifying questions about the system's scope, expected scale, and data retention needs. Identify the main entities (e.g., users, posts, connections) and their relationships.

2. Design core tables and keys

For each entity, define a table with a primary key (e.g., auto-incrementing bigint or UUID). Add foreign keys to enforce referential integrity, and consider junction tables for many-to-many relationships.

3. Incorporate soft deletes

Add a `deleted_at` timestamp column (nullable) to tables where soft deletes are needed. Explain how to filter active records and handle unique constraints with partial indexes.

4. Add audit fields

Include `created_at`, `updated_at`, and optionally `created_by`, `updated_by` columns. Discuss how to populate them (e.g., database triggers, ORM hooks) and their role in auditing and debugging.

5. Discuss trade-offs and optimizations

Talk about performance implications (indexing, query patterns), storage overhead, and alternatives like hard deletes with archival tables. Mention how soft deletes affect cascading deletes and data consistency.

Key Points to Mention

  • Primary keys: choice between auto-incrementing integers and UUIDs, considering distribution and performance.
  • Foreign keys: enforcing referential integrity, indexing foreign key columns, and handling cascading deletes/updates.
  • Soft deletes: using a `deleted_at` timestamp, filtering queries, and partial unique indexes to allow re-creation of deleted records.
  • Audit fields: `created_at`, `updated_at`, `created_by`, `updated_by`; ensuring they are set automatically and not user-modifiable.
  • Normalization vs. denormalization: balancing query performance with data integrity, especially for read-heavy systems like LinkedIn.
  • Scalability considerations: sharding, partitioning, and how soft deletes and audit fields impact these strategies.

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

Q4

Write SQL queries to list all events visible to a user within a time range, detect scheduling conflicts for a new event, and materialize a single occurrence from a recurring series given its recurrence rule and any exceptions.

Algorithms & Data StructuresData ModelingSystem Design
Author's notes

The conflict detection query tripped me up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the data model and assumptions (e.g., tables for events, attendees, recurrence rules, exceptions) and the exact semantics of 'visible' and 'time range'. Then walk through each query, explaining the logic and any edge cases, and finally discuss how to handle recurrence materialization and conflict detection efficiently.

Pro tip: Demonstrate awareness of time zones and DST when comparing timestamps, and mention that recurrence rules should be expanded using a library or a recursive CTE rather than ad-hoc string parsing.

1. Clarify requirements and schema

Ask clarifying questions about visibility (e.g., public, private, shared), time range boundaries (inclusive/exclusive), and the schema for events, attendees, recurrence rules, and exceptions.

2. Write query for visible events in range

Construct a SQL query that joins events with visibility/attendee tables and filters by the time range, considering time zone conversions if needed.

3. Detect scheduling conflicts

Write a query that checks for overlapping events for the user within the proposed time slot, using interval overlap logic (start < new_end AND end > new_start).

4. Materialize a single occurrence from recurrence

Explain how to expand a recurrence rule (e.g., using a recursive CTE or application logic) to generate occurrences, then apply exceptions and select the one matching the given time.

5. Discuss performance and edge cases

Mention indexing on time columns, handling large recurrence sets, and edge cases like all-day events, time zones, and DST transitions.

Key Points to Mention

  • Use of interval overlap condition (start < end AND end > start) for conflict detection.
  • Handling of recurrence rules: RFC 5545 RRULE, exceptions (EXDATE), and overrides (RECURRENCE-ID).
  • Time zone and DST considerations when comparing timestamps.
  • Indexing strategies on start/end times and user/visibility columns for performance.
  • Use of recursive CTEs or generate_series to expand recurrences in SQL.
  • Clarifying visibility semantics: public, private, shared with specific users/groups.

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

Q5

How would you partition and shard the data, and what caching and search indexing strategies would you use? Should recurring event instances be expanded in the background or computed on the fly?

System DesignTechnical Trade-offs
Author's notes

Partitioning by user ID or calendar ID was the obvious answer and I said both, which probably wasn't crisp enough.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and access patterns (e.g., number of events, users, read/write ratio) to ground your design. Then propose a sharding strategy based on access patterns (e.g., by user or event ID) and discuss caching layers (e.g., Redis for hot data) and search indexing (e.g., Elasticsearch). Finally, weigh the trade-offs between precomputing recurring event instances in the background versus computing on the fly, considering factors like query latency, storage cost, and complexity.

Pro tip: Demonstrate awareness of LinkedIn's specific scale and existing infrastructure (e.g., Espresso, Venice, Galene) by suggesting how your design could integrate with or leverage these systems. This shows you understand the company's tech stack and can make pragmatic choices.

1. Clarify Requirements and Scale

Ask questions to understand the expected data volume, read/write patterns, latency requirements, and query types (e.g., fetching events by user, searching by keyword). This ensures your design is appropriately tailored.

2. Design Partitioning and Sharding

Choose a sharding key that aligns with the most common access pattern (e.g., user ID for user-centric queries) and discuss strategies like consistent hashing to distribute load evenly. Mention how to handle hot shards and rebalancing.

3. Plan Caching Strategy

Identify hot data (e.g., upcoming events for active users) and propose a multi-level cache (e.g., local cache, Redis) with appropriate TTLs and invalidation strategies. Discuss cache coherence and fallback to persistent storage.

4. Implement Search Indexing

For search functionality, propose an inverted index (e.g., Elasticsearch) and discuss how to keep it in sync with the primary data store (e.g., via change data capture). Consider indexing fields like title, description, and location.

5. Decide on Recurring Event Expansion

Compare precomputing instances in the background (e.g., via a batch job) versus computing on the fly. Discuss trade-offs: precomputation reduces read latency but increases storage and write complexity; on-the-fly saves storage but may increase query time and complexity.

Key Points to Mention

  • Sharding key selection based on access patterns (e.g., user ID vs. event ID) and consistent hashing for even distribution.
  • Caching strategies: Redis or Memcached for hot data, with TTL and invalidation policies; consider write-through vs. write-behind.
  • Search indexing with Elasticsearch or similar, and synchronization via CDC or dual writes.
  • Recurring event expansion: precompute vs. on-the-fly, considering factors like query latency, storage cost, and update frequency.
  • Handling hot shards and rebalancing strategies (e.g., splitting shards, using virtual nodes).
  • Trade-offs between consistency, availability, and partition tolerance (CAP theorem) in the context of caching and indexing.

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

Q6

How do you handle concurrent edits to the same event, ensure idempotent retries, and manage distributed transactions? Where would you use the outbox pattern versus distributed transactions, and how do you handle eventual consistency for search and notifications?

System DesignTechnical Trade-offs
Author's notes

Went with optimistic locking using a version field on events.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by first addressing concurrency control (optimistic locking, versioning), then idempotency (idempotency keys, deduplication), and finally distributed transactions vs. outbox pattern. Discuss eventual consistency for search and notifications by explaining how to use change data capture (CDC) and message queues to propagate updates asynchronously.

Pro tip: Emphasize the trade-offs: distributed transactions (2PC) provide strong consistency but hurt availability and scalability, while the outbox pattern with eventual consistency is more resilient and fits LinkedIn's scale. Mention that idempotency is crucial for retries and can be achieved with unique request IDs and upsert semantics.

1. Concurrency Control

Explain how to handle concurrent edits using optimistic locking (version numbers) or pessimistic locking. Discuss conflict resolution strategies (last-write-wins, merge) and how to detect conflicts.

2. Idempotent Retries

Describe how to ensure retries don't cause duplicate side effects. Use idempotency keys, deduplication tables, or idempotent operations (e.g., upserts). Mention that clients should generate unique request IDs.

3. Distributed Transactions vs. Outbox

Compare 2PC (strong consistency, but blocking and not scalable) with the outbox pattern (eventual consistency, scalable). Explain when to use each: 2PC for critical financial transactions within a single service boundary, outbox for cross-service workflows where availability is key.

4. Eventual Consistency for Search and Notifications

Describe how to propagate changes asynchronously using CDC or domain events. For search, use a message queue to update the index; for notifications, use a similar pipeline. Discuss handling failures, retries, and ensuring at-least-once delivery with idempotent consumers.

5. Monitoring and Reconciliation

Mention the need for monitoring (e.g., lag, failures) and reconciliation jobs to detect and fix inconsistencies. Highlight that eventual consistency requires observability and compensating actions.

Key Points to Mention

  • Optimistic locking with version numbers to detect concurrent edits.
  • Idempotency keys and deduplication to handle retries safely.
  • Outbox pattern: write to outbox table in same transaction as business data, then publish events asynchronously.
  • Two-phase commit (2PC) limitations: blocking, coordinator failure, not suitable for high-scale microservices.
  • Change Data Capture (CDC) for propagating changes to search indexes and notification systems.
  • Eventual consistency trade-offs: higher availability and scalability at the cost of temporary inconsistency.

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

Q7

How would you design the reminder and notification delivery system, support ICS import and export, and handle external calendar sync? How do you prevent abuse and enforce quotas?

API & IntegrationsSystem Design
Author's notes

Reminder delivery I covered with a scheduled job scanning upcoming events and pushing to a notification queue.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design the system in layers: scheduling and delivery, ICS import/export, and external calendar sync. For each layer, discuss data models, APIs, and trade-offs, and finally address abuse prevention and quotas with rate limiting, validation, and monitoring.

Pro tip: Emphasize idempotency and fault tolerance in delivery and sync, and mention how you'd handle time zones and recurring events—common pitfalls in calendar systems. Also, tie abuse prevention to LinkedIn's scale and trust & safety needs.

1. Clarify Requirements and Scale

Ask about expected volume, latency, delivery guarantees, and supported calendar providers. Establish non-functional requirements like reliability, security, and compliance.

2. Design Reminder and Notification Delivery

Propose a scalable architecture using a message queue and workers, with idempotent delivery, retries, and dead-letter queues. Discuss storage for reminders and user preferences.

3. Implement ICS Import/Export

Define a service to parse and generate ICS files, handling time zones, recurring events, and validation. Ensure secure file upload and size limits.

4. Enable External Calendar Sync

Use provider APIs (Google, Outlook) with OAuth, incremental sync via sync tokens, and conflict resolution. Design for eventual consistency and error handling.

5. Prevent Abuse and Enforce Quotas

Apply rate limiting per user/IP, quota management, input validation, and anomaly detection. Integrate with monitoring and alerting for abuse patterns.

Key Points to Mention

  • Idempotency and exactly-once delivery semantics for notifications
  • Time zone handling and recurring event expansion (RFC 5545)
  • OAuth and secure token management for external calendar APIs
  • Incremental sync using sync tokens or delta APIs to reduce load
  • Rate limiting strategies (token bucket, sliding window) and quota enforcement
  • Monitoring, logging, and alerting for abuse detection and system health

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

Q8

Compare relational, document, and time-series databases for different parts of this system. What would you use as the primary store and what polyglot components would you add?

Technical Trade-offsSystem DesignData Modeling
Author's notes

Said relational for the core event and user metadata since you need joins and transactional guarantees.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's requirements and data access patterns, then map each database type to the components where its strengths align. Propose a primary store that handles the core workload, and justify polyglot additions for specialized needs like search, caching, or analytics.

Pro tip: Emphasize that polyglot persistence adds operational complexity, so only introduce additional stores when there's a clear, measurable benefit. Show you understand the trade-offs between consistency, scalability, and team expertise.

1. Clarify system requirements

Ask about data volume, velocity, variety, consistency needs, and access patterns (read/write ratio, query complexity). This sets the context for database choices.

2. Map database types to components

For each major component (e.g., user profiles, activity feed, messaging, analytics), identify which database type fits best based on its characteristics.

3. Choose primary store

Select the database that handles the most critical, high-volume workload as the primary store, justifying why it's the best fit.

4. Propose polyglot additions

Suggest additional databases for specialized needs (e.g., search, caching, time-series metrics) and explain how they integrate with the primary store.

5. Discuss trade-offs and integration

Address consistency, data synchronization, operational overhead, and how to avoid over-engineering. Highlight any potential challenges.

Key Points to Mention

  • Relational databases (e.g., MySQL, PostgreSQL) for transactional data with complex joins and strong consistency, like user accounts or billing.
  • Document databases (e.g., MongoDB, Couchbase) for flexible schemas and hierarchical data, such as user profiles or content management.
  • Time-series databases (e.g., InfluxDB, TimescaleDB) for high-write, timestamped data like metrics, monitoring, or activity tracking.
  • Polyglot persistence: using multiple database technologies to leverage their strengths, but managing increased complexity.
  • Data synchronization patterns: change data capture (CDC), event sourcing, or dual writes to keep stores consistent.
  • Caching and search: Redis for caching, Elasticsearch for full-text search, as common polyglot additions.

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