← Openai Interview Insights

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

Senior
Apr 2026

Summary

System design round at OpenAI for a software engineer role. The whole session was basically one big Instagram design question that kept drilling deeper the longer I talked.

Questions Asked (3)

Q1

Design Instagram, with a focus on how you'd generate and deliver the feed.

System DesignData ModelingTechnical Trade-offs
Author's notes

Started with the broad strokes: core components, how a post travels from upload to someone's feed, where you'd need to scale.

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 that separates feed generation from delivery. Focus on the feed pipeline: how to efficiently generate personalized feeds for millions of users and deliver them with low latency, discussing trade-offs between precomputation and on-demand generation.

Pro tip: Emphasize the trade-off between precomputing feeds (fast reads, expensive writes) and generating on-the-fly (flexible, but higher latency), and propose a hybrid approach that balances both based on user activity and follower count.

1. Clarify Requirements

Ask about scale (DAU, photos per user), latency requirements, feed freshness, and personalization needs. Confirm whether the feed is reverse-chronological or ranked.

2. High-Level Architecture

Outline core components: photo upload service, feed generation service, feed storage/cache, and delivery API. Mention data stores like object storage for photos and a graph database for social connections.

3. Feed Generation Strategy

Discuss push vs. pull models. For push, use a fan-out service to write to followers' feed caches; for pull, generate on read. Propose a hybrid: push for active users, pull for celebrities.

4. Feed Delivery and Caching

Explain how to serve feeds with low latency using in-memory caches (e.g., Redis) and CDNs for media. Discuss pagination, cursor-based fetching, and consistency trade-offs.

5. Scaling and Trade-offs

Address scaling challenges: hotkeys, celebrity problem, storage costs, and real-time updates. Discuss monitoring, failure handling, and potential optimizations like ranking algorithms.

Key Points to Mention

  • Fan-out on write vs. fan-out on read and the celebrity problem
  • Use of caching layers (Redis, Memcached) for feed storage and delivery
  • Data modeling: social graph, user feeds, and photo metadata
  • Ranking and personalization (e.g., ML models) vs. chronological feeds
  • Handling high write throughput and eventual consistency
  • CDN and media storage for images/videos

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

Q2

How would you handle feed delivery for accounts that have millions of followers, like celebrities?

System DesignTechnical Trade-offs
Author's notes

This is where it got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and requirements (e.g., read vs write patterns, latency, consistency). Then propose a hybrid architecture that combines fan-out-on-write for most users with fan-out-on-read for celebrity accounts, and discuss trade-offs like latency, cost, and complexity.

Pro tip: Mention that the threshold for switching between fan-out strategies should be dynamic and based on follower count and activity, and that you'd monitor and adjust it. This shows you think about operational maturity, not just theoretical design.

1. Clarify Requirements

Ask about scale (number of users, followers, posts per day), latency expectations, consistency needs, and read/write ratio. This ensures your design targets the right constraints.

2. Evaluate Fan-out Strategies

Compare fan-out-on-write (push) vs fan-out-on-read (pull). Explain that push is great for low-latency reads but expensive for celebrities, while pull is cheaper for writes but adds read latency.

3. Propose Hybrid Approach

Suggest a hybrid: use push for normal users and pull for celebrities. For celebrities, store their posts separately and merge at read time. This balances latency and cost.

4. Address Trade-offs and Optimizations

Discuss trade-offs: increased read complexity, potential latency spikes, and cache strategies. Mention optimizations like pre-computing feeds for active users, using CDNs, and caching celebrity posts.

5. Discuss Scalability and Monitoring

Explain how to scale the solution (sharding, replication) and monitor performance (latency, error rates). Suggest dynamic thresholds for switching strategies based on follower count.

Key Points to Mention

  • Fan-out-on-write vs fan-out-on-read trade-offs
  • Hybrid approach for celebrity accounts
  • Caching strategies (e.g., Redis, CDN) to reduce latency
  • Dynamic threshold for switching strategies based on follower count
  • Read-time merging of celebrity posts with precomputed feeds
  • Monitoring and adjusting the system based on real-time metrics

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

Q3

How do you scale database reads for the feed delivery layer?

System DesignTechnical Trade-offs
Author's notes

Follow-up that came straight from the celebrity question.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and read patterns of the feed delivery layer, then propose a multi-layered caching strategy with read replicas and denormalization. Discuss trade-offs between consistency, latency, and cost, and how to handle cache invalidation and hot keys.

Pro tip: Emphasize that scaling reads is not just about adding caches; it's about understanding the access patterns and designing for the common case while gracefully handling the tail. Mention that at OpenAI, feed delivery often involves personalized content, so precomputation and edge caching can be game-changers.

1. Clarify Requirements

Ask about read volume, latency SLAs, data size, and consistency requirements to scope the problem.

2. Identify Bottlenecks

Analyze the current architecture to find where reads are hitting the database directly and causing contention.

3. Propose Caching Layers

Introduce client-side, CDN, application-level, and database caching with appropriate TTLs and invalidation strategies.

4. Scale with Replicas and Sharding

Use read replicas to distribute load and consider sharding or partitioning for horizontal scaling.

5. Discuss Trade-offs and Monitoring

Evaluate consistency vs. availability, cost implications, and set up monitoring for cache hit rates and replication lag.

Key Points to Mention

  • Caching strategies (Redis, Memcached, CDN) and cache invalidation techniques (TTL, write-through, write-behind).
  • Read replicas and eventual consistency trade-offs.
  • Denormalization and precomputed feeds for personalized content.
  • Handling hot keys and thundering herd problems.
  • Monitoring and metrics (cache hit ratio, replication lag, latency percentiles).
  • Cost and operational complexity of scaling solutions.

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