Backmatter/Appendix E: Case Studies

Case Studies Index

Throughout this book, real companies illustrate real principles. This index collects every case study by company, with the lesson it teaches and the chapter where it appears. Use it as a reference when you want to revisit a specific example, or read it straight through for a tour of how the world's best products are built.

Global AI Companies

Anthropic

  • Constitutional AI and RLHF training methodology — how Claude learns to be helpful, harmless, and honest through human feedback and AI-generated critiques. Chapter 10
  • "Building Effective Agents" — the internal research that defines when agents outperform simple prompts, and the augmented LLM pattern that grounds agent design. Chapter 15
  • Model Context Protocol (MCP) — designing an open standard for tool use that decouples models from integrations, enabling any model to use any tool. Chapter 16
  • Structured output and tool use design — how function calling was engineered to be reliable enough for production systems. Chapter 11
  • Prompt engineering best practices — the operational patterns behind Claude's system prompts and the reasoning behind few-shot vs. zero-shot guidance. Chapter 11
  • Claude Code as a development workflow — how AI-assisted coding changes the role of the developer from writer to director. Chapter 19

OpenAI

  • GPT scaling decisions — the bet on scale over hand-engineered features that defined modern AI. How each doubling of compute produced predictable capability gains. Chapter 9
  • ChatGPT product design — how a conversational interface made LLMs accessible to non-technical users overnight, reaching 100 million users faster than any product in history. Chapter 10
  • DALL-E and multimodal models — extending transformers beyond text to image generation, and the architectural decisions behind native multimodality. Chapter 17
  • Function calling API design — the design decisions that made structured tool use reliable: JSON schemas, required parameters, and the separation between "model suggests a call" and "your code executes it." Chapter 15
  • Whisper and open-source strategy — releasing a state-of-the-art speech recognition model for free to build ecosystem and establish the standard. Chapter 17

Google / DeepMind

  • "Attention Is All You Need" (2017) — the paper that launched the transformer revolution. Every LLM, every embedding model, every modern AI system traces its lineage to this architecture. Chapter 10
  • BERT and bidirectional encoding — how training a model to predict masked words (instead of next words) created the modern understanding of semantic similarity that powers search and embeddings. Chapter 12
  • Gemini multimodal architecture — native multimodal training vs. bolting separate vision and language models together, and why the native approach produces more coherent reasoning. Chapter 17
  • Google Search infrastructure — serving billions of queries with sub-second latency, and the engineering papers (MapReduce, Bigtable, Spanner) that taught the industry how to build at scale. Chapter 8

Meta

  • Llama and the open-weight strategy — releasing model weights to accelerate the ecosystem while maintaining competitive advantage through speed of iteration. The decision that changed the AI industry's economics. Chapter 14
  • React's component model — how a UI library from Facebook became the foundation of modern web development by betting on declarative rendering over imperative DOM manipulation. Chapter 2
  • Infrastructure at scale — the engineering behind serving 3 billion users with five-nines availability, including the October 2021 DNS outage that took down Facebook, Instagram, and WhatsApp for six hours. Chapter 1, Chapter 8

Indian Tech Ecosystem

Swiggy

  • Real-time delivery ETA prediction — ML models that factor in restaurant prep time, traffic patterns, driver availability, and weather to predict delivery time within 3 minutes of accuracy. A case study in feature engineering under real-world constraints. Chapter 9
  • Dynamic pricing and surge management — balancing supply (drivers) and demand (orders) with pricing algorithms that feel fair to users while maintaining marketplace health. Chapter 24
  • Experimentation culture — running hundreds of A/B tests simultaneously across conversion funnels, checkout flows, and recommendation algorithms. How data-driven product decisions work at scale. Chapter 7
  • Instamart 10-minute delivery logistics — the engineering behind dark stores, route optimization, and inventory management that makes instant commerce possible. Chapter 8

Zomato

  • Search and recommendation architecture — personalized restaurant ranking where user preferences, location, cuisine history, and restaurant quality all compete for weight in the algorithm. Chapter 12
  • The "biryani near me" request trace — what happens in 200 milliseconds: DNS resolution, HTTP requests, API calls, database queries, ML inference, and frontend rendering, traced end to end as the book's opening example. Chapter 1
  • Hyperpure and B2B platform thinking — extending a consumer brand into supply-chain infrastructure for restaurants. Chapter 24

Flipkart

  • Big Billion Days engineering — handling 10x traffic spikes without downtime through queue-based processing, circuit breakers, graceful degradation, and pre-computed recommendation caches. Chapter 8
  • Product catalog database design — modeling millions of SKUs with variants, pricing tiers, seller-specific inventory, and cross-references across categories. Chapter 4
  • Search relevance for Indian e-commerce — multilingual search, vernacular queries, and the challenge of product taxonomy when the same item has different names in different languages. Chapter 12

PhonePe

  • UPI payment flow — the multi-system handshake between your phone, PhonePe's servers, NPCI, and the recipient's bank, all completing in under 2 seconds with five-nines reliability. Chapter 3, Chapter 8
  • Security and fraud detection architecture — real-time transaction monitoring, encryption layers, and compliance requirements where every failure costs real money and real trust. Chapter 28

Meesho

  • Social commerce data model — the reseller-supplier-buyer relationship and how a zero-inventory marketplace maintains consistency across a three-sided platform. Chapter 4
  • Vernacular-first design — building for users who think in Hindi, Tamil, or Telugu. Implications for AI (multilingual models), UI (script-specific typography), and product strategy (voice-first interaction for low-literacy users). Chapter 21
  • Tier 2/3 India optimization — designing for low-bandwidth networks, smaller screens, intermittent connectivity, and extreme price sensitivity. Chapter 24

Freshworks

  • Multi-tenant SaaS architecture — one codebase serving 60,000+ businesses with isolated data, customizable workflows, and per-tenant feature flags. Chapter 8
  • Freddy AI integration — how LLMs were integrated into an existing enterprise product (customer support) without disrupting workflows that thousands of businesses depend on. Chapter 15

Razorpay

  • Payment gateway API design — abstracting the complexity of UPI, cards, netbanking, and wallets behind a single, elegant API. Idempotency keys, webhook patterns, and PCI compliance. Chapter 3
  • Developer experience as competitive moat — how API documentation, SDKs, and sandbox environments became the reason developers chose Razorpay over alternatives. Chapter 3

Zerodha

  • Minimalist architecture philosophy — serving millions of traders with a deliberately simple tech stack. No microservices, no Kubernetes, no over-engineering. The most compelling counter-argument to architectural complexity in Indian tech. Chapter 8
  • Real-time market data streaming — pushing live price updates to millions of concurrent WebSocket connections with sub-second latency during market hours. Chapter 3

Global Product Companies

Netflix

  • Recommendation engine — the system behind "Because you watched." Collaborative filtering, content embeddings, and the exploration-exploitation tradeoff applied to 200 million users. Chapter 12
  • Chaos Monkey and resilience engineering — deliberately breaking production systems to prove they recover. Netflix proved that controlled failure in peacetime prevents uncontrolled failure in crisis. Chapter 7
  • A/B testing at massive scale — testing everything from thumbnail images to encoding algorithms, and the statistical challenges of experimentation on a global user base. Chapter 7
  • Microservices evolution — the journey from monolith to 700+ microservices, what they learned, and what they'd do differently. Chapter 8

Stripe

  • API design as competitive advantage — Stripe's REST API became the gold standard. Consistent naming, predictable error formats, idempotency keys, and versioned endpoints. Chapter 3
  • Webhook reliability — guaranteed delivery, retry logic with exponential backoff, event ordering, and the patterns that make asynchronous systems trustworthy. Chapter 3
  • Design system and visual identity — the reference point for premium typography, generous whitespace, and visual hierarchy. When this book says "like Stripe," it means intentional restraint and typographic precision. Chapter 21

Amazon

  • The two-pizza team mandate — Jeff Bezos's memo requiring all teams to expose functionality through APIs. The organizational decision that accidentally created the foundation for AWS. Chapter 8
  • AWS and infrastructure-as-product — the most consequential pivot in tech history: from selling books to selling cloud computing, proving that internal tools can become external platforms. Chapter 6

Shopify

  • Platform architecture — how a storefront builder evolved into an ecosystem with themes, apps, a developer platform, and a commerce operating system. Build-vs-buy at scale. Chapter 24
  • Flash sale engineering — handling Black Friday traffic spikes across millions of independent stores, each with different traffic patterns. Chapter 8
  • Shopify Magic — AI features embedded into an existing product without disrupting the workflows merchants depend on. A case study in tasteful AI integration. Chapter 15

Linear

  • Dense UI design — high information density with monospaced fonts, muted colors, keyboard-first navigation, and obsessive attention to animation timing. The opposite of consumer-friendly, optimized for power users who live in the tool. Chapter 21
  • Real-time sync and offline support — how Linear maintains instant responsiveness with local-first architecture and conflict resolution. Chapter 8

Spotify

  • Discover Weekly and audio embeddings — collaborative filtering combined with audio feature analysis to surface music users love but haven't heard. The recommendation system that proved AI could create cultural moments. Chapter 12
  • Microservices at scale — Spotify's journey from monolith to hundreds of microservices, the organizational alignment (each team owns services, not features), and the lessons from what went wrong. Chapter 8

WhatsApp

  • Efficiency at scale — 50 engineers serving 900 million users. Erlang for concurrency, ruthless feature focus, minimal infrastructure complexity. The strongest counter-example to "you need a big team for a big product." Chapter 8
  • End-to-end encryption — the Signal Protocol implementation that protects billions of daily messages. The server never sees message content, which means the architecture must handle delivery, ordering, and multi-device sync without reading what it's delivering. Chapter 28

How to Use This Index

By pattern: If you're interested in how companies handle traffic spikes, read Flipkart (Big Billion Days), Shopify (Black Friday), Netflix (global streaming), and Zomato (lunch hour). If you care about API design, study Stripe, Razorpay, and Shopify. If you're integrating AI into an existing product, look at Freshworks (Freddy), Shopify (Magic), and Linear.

By geography: Indian companies appear throughout because their engineering challenges are distinct — lower bandwidth, diverse payment methods, extreme scale spikes (cricket match endings causing millions of simultaneous food orders), vernacular users who expect premium experiences, and price sensitivity that demands efficiency at every layer of the stack.

By stage: If you're a solo builder, study Zerodha (simplicity at scale) and WhatsApp (small team, massive impact). If you're building a platform, study Stripe (developer experience), Shopify (ecosystem), and Amazon (internal tools becoming products). If you're adding AI to an existing product, study every company in the "Global AI Companies" section.

Every case study in this book is based on publicly available information: engineering blog posts, conference talks, open-source repositories, and published architecture documentation. Where implementation details are inferred rather than documented, the text notes it explicitly.