Frontend Performance Case Studies: Netflix, Airbnb, Flipkart

How Pinterest, Airbnb, Netflix, Flipkart, Myntra and others turned a constraint into an architecture decision, and how each was measured and rolled out.

Related chapters

Keep learning

Overview

Constrained mobile web A large JavaScript monolith made the product slow to become usable on ordinary phones and slow networks. Make the first route small, split later routes, optimize images, and use a service worker for repeat visits and basic resilience. The article describes a lean application shell, route-level chunks, progressive caching, and explicit invalidation when the app version changes. Initial JavaScript, time to usable UI, repeat-visit performance, and conversion on representative mobile hardware. Pinterest PWA performance case study Brownfield rearchitecture A page-by-page server application needed fluid client navigation without turning into one giant startup bundle. Keep an API boundary, server-render the entry route, ship the minimum client code, split by route, and fetch later bundles during idle time. Config, experiments, translations, and API data must agree on server and client. Otherwise hydration and navigation produce two different products. Route payload, startup interactivity, client-navigation latency, cache reuse, hydration errors, and accessible task completion. Rearchitecting Airbnb’s Frontend Reliable social web A social timeline must remain useful across unreliable networks, low-end devices, and repeated short sessions. Treat the mobile web client as a product: an installable PWA, a carefully controlled application shell, and normalized client data for timeline updates. Twitter Lite combined React, Redux, Normalizr, webpack, a web app manifest, and service-worker capabilities around a mobile-first experience. A cached shell is not a cached timeline. User-specific data needs freshness, privacy, and logout semantics separate from static assets. How we built Twitter Lite Team and build boundaries One growing application coupled unrelated sections, dependencies, local compilation, and preview builds. Split vertically at sections users rarely cross, retain shared packages, and migrate route by route behind flags. A route belongs to one application. Traffic moves incrementally, real-user performance is watched, and the old implementation is removed only after a stable window. Microfrontends can create hard navigations, duplicate dependencies, and difficult local testing. Prefetch on evidence, not everywhere, and keep the boundary coarse. Build and local compile time, route payload, hard-navigation latency, LCP/INP by application, and rollback rate. How Vercel adopted microfrontends Weak-device UI runtime The same TV interface runs on device classes with very different CPU, memory, and graphics limits. Define device-level budgets, profile the actual render path, and optimize the measured hot operations instead of applying generic React folklore. A compiler or renderer optimization that wins on one runtime can lose elsewhere. Keep a representative device lab and verify every special case. Key-input response, time to interactive, frames per second, memory high-water mark, and video-start responsiveness by device tier. Crafting a high-performance TV UI using React Cross-platform composition Business logic in each client caused multiple API calls, duplicated platform work, and slower product evolution. Move composition toward a shared backend contract so web, TV, and mobile clients render a consistent product model instead of rebuilding it independently. The Hotstar X story contrasts the earlier client-heavy architecture with a more unified, backend-heavy platform and shared product direction. Server-driven output still needs versioned schemas, capability negotiation, safe fallbacks, and client-owned interaction state. API round trips per screen, payload size, time to first useful screen, cross-platform parity, schema fallback rate, and release lead time. Hotstar X: rebuilding the experience Release confidence at scale Hundreds of end-to-end tests had become slow and flaky, weakening a fast trunk-based release process. Make test data deterministic, select tests from the change, batch by historical duration, and make every failure debuggable. Rippling moved to Playwright, restored prepared database state, ran selected batches in parallel, and published traces, screenshots, and video reports. End-to-end tests should protect critical journeys, not duplicate every unit test. Track flake rate and assign ownership or the suite will decay again. Feedback time, flake rate, changed-flow coverage, rerun rate, time to diagnose, and escaped critical-journey defects. Rippling’s end-to-end testing overhaul UI consistency across teams Independent teams duplicated components and gradually produced inconsistent visuals and behavior. Build from presentational components, central tokens, constrained APIs, documentation, and visual checks rather than a gallery of copied widgets. The design-system write-up separates reusable presentation from application data and business logic, with the theme as a governed contract. A library without adoption, migration, and ownership is only another dependency. Measure duplication removed and product surfaces migrated. Adoption by surface, duplicate component count, accessibility defects, visual regressions, bundle cost, and upgrade completion time. Creating a Design System at Myntra Commerce on 2G A large share of customers reached the store through constrained mobile networks and needed a small, reliable entry point. Use a mobile-first PWA, aggressively control transfer size, cache the reusable shell, and expose install and re-engagement capabilities progressively. Flipkart Lite used service workers and modern web capabilities so repeat visits could work quickly even when the network was flaky. Progressive enhancement must leave a usable path on browsers without the newest APIs. Offline UI may browse stale data but must not pretend checkout succeeded. Data used per session, repeat-load time, task completion on 2G, cache hit rate, failed checkout recovery, and browser coverage. Flipkart Lite PWA case study Fast mobile delivery React Native teams wanted to reach users with JavaScript fixes and features faster than store releases allowed. Treat over-the-air delivery as a release system with version targeting and operational control, not as a file download endpoint. Zepto’s Phoenix write-up describes an in-house OTA platform built for frequent update checks across its React Native applications. Stage every update, bind it to compatible native versions, keep a kill switch and rollback path, and never use OTA to bypass native-platform rules. Update adoption, check latency, patch size, crash-free sessions by bundle version, rollback time, and incompatible-update blocks. Why Zepto built an in-house CodePush platform Google / web.dev Rendering and field evidence Rendering debates become framework labels, while a fast lab run can hide slow devices, expensive hydration, and the tail of real sessions. Choose rendering per route from content and interaction needs, then combine lab diagnosis with segmented real-user measurement at the 75th percentile. Server-rendered pixels are not necessarily ready interactions. Include TTFB, client JavaScript, hydration work, and the server/client data contract in the budget. LCP, INP, and CLS at p75 by mobile and desktop, plus TTFB, JavaScript cost, hydration delay, and route-level task readiness. Rendering on the Web Amazon Web Services Microfrontend decision model Large organizations need autonomous delivery, but splitting the browser runtime can move coordination costs into users’ devices. AWS guidance treats routing, state, dependencies, communication, composition, and BFF ownership as explicit architecture decisions. Start with a modular application unless independent deployment is solving a measured organizational bottleneck. Share cross-cutting code intentionally. Independent lead time, cross-boundary calls, duplicated runtime cost, page weight, failure isolation, and coordinated-release frequency. AWS microfrontends prescriptive guidance Cacheable server output plus client navigation for repeated exploration. Separate the fast browse shell from the capability-aware player runtime. Use typed domain APIs with a client server-state cache and explicit invalidation. Use feature modules in one deployable application with one route, token, and observability contract. Ship behind cohort flags, watch segmented field signals, and make rollback one action. Use immutable assets, preview environments, critical-journey tests, and an atomic release manifest. the slowest supported device in the fleet a p75 field cohort on ordinary hardware Rendering and delivery Put useful pixels before optional runtime work. Data boundary The browser should not reconstruct backend topology or duplicate durable business rules. Count round trips, payload bytes, cancellation, stale reads, and error-contract coverage. Code and team boundary A technical split earns its cost only when it removes real delivery coupling. Compare lead time, coordinated releases, duplicate dependencies, and cross-boundary calls. Release safety Fast delivery without detection and reversal only increases the blast radius. Track field regressions, flake rate, crash/error rate by version, and time to rollback. The old service worker serves a new HTML shell The shell requests chunk names that no longer exist, or a logged-out user sees personalized cached UI. Static assets, HTML, user data, and service-worker versions need different cache policies. Keep hashed assets available, deploy HTML atomically, version cache names, purge private state on logout, and provide a safe refresh path. Pinterest makes app-version invalidation part of the shell design—not an afterthought. A microfrontend seam feels like leaving the product Navigation loses the shared shell, downloads duplicate code, or becomes slower than the former monolith. The route seam is too fine, shared dependencies are not governed, or prefetch spends resources too early. Prefer vertical boundaries, preserve stable chrome, prefetch on visibility or intent, and merge sections that users cross constantly. Vercel reports hard-navigation and local-preview trade-offs alongside its build-time gains. The UI is smooth on laptops and fails on the target device Key presses lag, surfaces disappear, memory grows, or a media screen drops frames. The performance contract was defined by developer hardware instead of the supported fleet. Create device tiers, cap mounted work and decoded media, profile the hot path on real devices, and degrade effects before core controls. Netflix’s TV work starts from key response, startup, FPS, and memory on constrained devices. A fast feature passes CI and slows the field Synthetic tests stay green while one country, device class, or route develops poor interactions. The release pipeline proves correctness but does not connect the change to real-user performance. Attach RUM to release and cohort IDs, compare p75 segments, gate gradual rollout, and revert automatically when the agreed budget breaks. One platform ships a response another client cannot render A new module works on web but disappears, crashes, or behaves differently on an older TV or mobile client. Server-driven composition has become an unversioned remote component API. Version the schema, declare client capabilities, make unknown modules skippable, provide defaults, and measure fallback usage before retiring old shapes. Chapter 72 · case studies Copy the constraint, not the company’s stack Production write-ups are useful when you can trace pressure → decision → mechanism → guardrail → measurement. This lab turns twelve industry stories into a frontend design method.

1. Read an engineering blog as an architecture decision

Pick a company. The reusable lesson is the chain of reasoning, not its framework name. Choose an industry case study

{selected.company}

Prove it How to use company engineering articles Reuse the decision when your constraints and success signals match. Keep the rollback, invalidation, accessibility, and measurement work attached. “Netflix uses it” is not a requirement, benchmark, or architecture argument.

2. Build a design from constraints

Change the product. The recommendation changes because architecture is a response to workload, users, teams, and failure cost. Device and network Mixed public Controlled fleet Product shape Catalog / feed Long-lived workspace Streaming media Frontend teams One team Many teams Release cadence A frontend request path from device to domain services and measurements known device tier public device CDN + shell BFF / composer typed API domain services RUM + release id

3. Inject the failure before production does

A senior design names who detects the problem, what remains usable, and how the system returns to a known-good state. Failure drill Stale shell Slow app seam Weak device Field regression Old client schema

{failure.title}

What the user sees Broken boundary Contain and recover Industry evidence Who, device, network, session, SEO, accessibility, offline? A ranked constraint list and non-goals What happens from URL or gesture to useful pixels? Browser → edge → BFF/API → cache/data flow Who owns server, URL, local, draft, and ephemeral state? Ownership and invalidation table Which limit is enforced for each supported tier? JS, image, LCP/INP, memory, request, and error budgets What can be stale, missing, retried, queued, or rolled back? Degraded UI and recovery path How does one cohort receive, prove, and reverse the change? Flags, release id, RUM, canary, and rollback

4. The six-pass staff-level review

Six passes through a frontend system design Leave evidence Interview sentence: “I’ll start with the user and device constraints, draw the critical request path, separate state ownership, attach budgets, break one dependency, then explain rollout and rollback.”

5. Primary reading shelf

These articles are snapshots of a problem and its context, not claims about each company’s current stack. Read the original before repeating a number or design choice. Google’s Web Vitals field guide p75 real-user loading, interaction, and layout signals Vercel dashboard performance Hot paths and field measurement Airbnb’s trip to Linaria Measured runtime styling cost and migration Building Myntra Zero Bundle budgets, legacy browsers, and offline data

More courses

  • Jobs, linked to lessons — Browse jobs where every requirement links to the chapter that teaches it. See how ready you are, how long the gap takes to close, and which listings look stale.
  • Match a job post to courses — Paste a job post. Each skill is matched to a track here and put in learning order, foundations first.
  • React patterns from open source — Patterns extracted from Material UI, Radix, React Aria, React Hook Form, Redux Toolkit, TanStack, and Next.js — not slides about hooks.
  • Databases in depth — How a query becomes work. Indexes, isolation, locks, and the plans that explain why a page is slow — not an ORM tour.
  • System Design — Core concepts first (SQL vs NoSQL, CAP, indexing, replication, sharding), then designs grouped by what carries them: the database, Redis, Kafka, or many services.
  • NestJS: build a real API — One ticket-booking API, built in order: a plain Node server first, then NestJS modules, validation, a real database, and the features real clients lean on.
  • Microservices — Microservice patterns one diagram at a time: how to split a monolith, how services talk, and how data stays consistent without distributed transactions.
  • Kafka — A beginner-to-senior path through event logs, reliable delivery, production operations, and disaster recovery.
  • AI engineering for software engineers — Eight free reads, in order, for software engineers moving into AI: when to build an agent, how to build one, how to test it, and how the model works underneath.
  • TypeScript in depth — The type system as a design tool. Inference, narrowing, generics, and the errors that mean the model is wrong — not a catalog of utility types.
  • CSS in depth — See the box, then the page. Visual chapters from the box model through Flexbox surprises, Grid, selectors, and units, then backgrounds, shapes, and visual effects, each with a playground.
  • Accessibility — Foundations first (WCAG in plain words, semantic HTML, lists, alt text), then hands-on HTML labs, a full pass of WAI-ARIA 1.3, and a final fix-the-page challenge.
  • Docker — What an image is, why layers cache, and how containers find each other on a network.
  • Redis — Fifteen Redis patterns, one picture each: cache, session, lock, counter, rate limiter, queue, and when Redis is the wrong tool.
  • Kubernetes — Kubernetes from zero to operators: why it exists, Pods, Deployments and Services, then configuration, networking, storage, scheduling, scaling and security.
  • AWS — AWS networking in plain English. A VPC is a gated housing society: streets are subnets, the Internet Gateway is the main gate, and a route table is the signboard.
  • Networking: the NetRoute game — NetRoute is a packet logistics game. You wire up computers, switches, routers, firewalls and gateways, set each device, and watch glowing packets travel. If a packet gets dropped, the game shows you which header field was wrong.