Frontend School
DashboardProblemsLearnPracticeMock InterviewReportsStatsBuy Credits
DashboardProblemsLearnPracticeMock Interview
Frontend System Design Roadmap
  1. 1.HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC)
  2. 2.TCP and TLS Handshakes: Connection Setup Costs
  3. 3.Browser Network Stack and Connection Pooling
  4. 4.GET vs POST and Idempotency in HTTP
  5. 5.The Critical Rendering Path (CRP)
  6. 6.DOM, CSSOM and the Render Tree
  7. 7.Layout, Paint and Compositing
  8. 8.Reflows and Repaints Explained
  9. 9.Event Loop: Call Stack, Task and Microtask Queues
  10. 10.Async JavaScript: Promises and async/await
  11. 11.Web Workers: Multi-threading in the Browser
  12. 12.Browser Storage: Cookies, Web Storage, IndexedDB
  13. 13.Client-Side Storage: Limits and Security Risks
  14. 14.Choosing the Right Client-Side Storage
  15. 15.HTTP Caching: Cache-Control, ETag, Last-Modified
  16. 16.Browser-Level Caching Mechanisms
  17. 17.Cache Invalidation for Frontend Apps
  18. 18.Structuring a Large Single-Page App
  19. 19.Component-Based Architecture Principles
  20. 20.Props, State and Component Lifecycle
  21. 21.Module Bundling Basics
  22. 22.Core Web Vitals: LCP, INP and CLS
  23. 23.FCP and Time to Interactive (TTI) Explained
  24. 24.Measuring Performance: Lighthouse and WebPageTest
  25. 25.Asset Compression and Minification Basics
  26. 26.What Is a CDN and How Does It Work?
  27. 27.CDN Benefits: Latency, Availability, Offload
  28. 28.CDN Cache Behavior and Invalidation
  29. 29.Global State vs Local Component State
  30. 30.State Patterns: Redux, Zustand and Context
  31. 31.Data Fetching: React Query and SWR
  32. 32.Immutable Data in Frontend State
  33. 33.SSR vs CSR: Rendering Trade-offs
  34. 34.Hydration and Time to First Byte (TTFB)
  35. 35.Static Site Generation (SSG) for Speed and SEO
  36. 36.Incremental Static Regeneration (ISR)
  37. 37.Micro-Frontends: Core Principles
  38. 38.Micro-Frontend Integration Strategies
  39. 39.Communication Between Micro-Frontends
  40. 40.Micro-Frontends: Pros and Cons for Large Teams
  41. 41.Real-Time: Polling, SSE and WebSockets
  42. 42.Real-Time Use Cases: Chat, Alerts, Live Data
  43. 43.Designing a Real-Time Data Flow
  44. 44.Scaling WebSocket Connections
  45. 45.Responsive Images: srcset, sizes and picture
  46. 46.Modern Image Formats: WebP, AVIF, JPEG XL
  47. 47.Lazy Loading Images and Videos
  48. 48.Video Streaming: HLS, DASH, Adaptive Bitrate
  49. 49.REST and GraphQL for Frontend Engineers
  50. 50.Batching, Throttling and Debouncing API Calls
  51. 51.Handling API Errors in the Frontend
  52. 52.Authentication Flows: OAuth and JWT
  53. 53.Global Error Boundaries in React
  54. 54.Error Reporting: Sentry and LogRocket
  55. 55.Graceful Degradation and Fallback UIs
  56. 56.Real User Monitoring (RUM)
  57. 57.CORS: Cross-Origin Resource Sharing
  58. 58.Preventing XSS (Cross-Site Scripting)
  59. 59.CSRF Protection for Frontend Apps
  60. 60.Content Security Policy (CSP)
  61. 61.Storing Auth Tokens: Cookies vs localStorage
  62. 62.PWA Manifest and Installability
  63. 63.Service Workers: Lifecycle and Caching Strategies
  64. 64.Offline Support and Background Sync
  65. 65.Push Notifications for Web Apps
  66. 66.Webpack vs Vite vs Parcel
  67. 67.Code Splitting, Tree Shaking, Asset Optimization
  68. 68.Module Resolution and Hot Module Replacement
  69. 69.Monorepo Tooling: Nx and Lerna
  70. 70.Atomic Design for Component Libraries
  71. 71.Theming and Customization in Design Systems
  72. 72.Accessibility in Component Libraries
  73. 73.Component Library Docs, Testing and Versioning
  74. 74.Publishing and Consuming a Component Library
  75. 75.Full-Text Search: Levenshtein and Fuzzy Matching
  76. 76.Indexing Large Datasets in the Browser
  77. 77.Search Performance: Debouncing and Web Workers
  78. 78.Integrating Backend Search Services
  79. 79.Choosing a Chart Library: D3, Chart.js, Recharts
  80. 80.Rendering Large Datasets: Canvas vs SVG
  81. 81.Interactive, Responsive Data Visualizations
  82. 82.Data Fetching and Aggregation for Dashboards
  83. 83.A/B Test Design and Rollout Strategies
  84. 84.Client-Side vs Server-Side A/B Testing
  85. 85.Feature Flags and Remote Configuration
  86. 86.Experiment Data Collection and Analytics
Frontend System Design Roadmap
01

Frontend System Design · Lesson 1 of 86 · 4 min

HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC)

This is a fundamental check. If you can't explain why HTTP/2 was created and what HTTP/3 fixes, the interviewer will question your understanding of web performance.

This lesson gives you the core story of HTTP's evolution. You need to be able to explain the performance bottleneck in each version and how the next one solved it. This isn't just history; it's the "why" behind modern frontend optimization.

HTTP/1.1: One request at a time

HTTP/1.1 handles one request and response at a time on a single TCP connection. If you need to download an HTML file, a CSS file, and an image, they are requested sequentially. The next request can't start until the previous response is fully received.

This creates a bottleneck called Head-of-Line Blocking (HOLB). A slow or large response blocks everything behind it on that connection.

To work around this, browsers open multiple TCP connections to the same domain (typically 6). This allows for some parallelism, but each new connection has an overhead cost: the TCP and TLS handshakes, which we'll cover in the next lesson.

HTTP/2: Multiplexing fixes one problem, but not the big one

HTTP/2's main goal was to solve HTTP/1.1's HOLB. Its key feature is multiplexing, which allows multiple requests and responses to be sent and received in parallel over a single TCP connection.

The browser can fire off requests for all the assets on a page at once, and the server can send them back as they become available. A small, quick image doesn't have to wait for a large, slow script. This eliminates the need for multiple connections, saving on handshake overhead.

HTTP/2 also introduced a more efficient binary protocol (instead of text) and header compression (HPACK) to reduce data transfer.

The trap: A lot of developers think HTTP/2 completely solved Head-of-Line Blocking. It did not. It solved HOLB at the application layer (HTTP requests), but the problem still exists at the transport layer (TCP).

Because all these parallel streams are multiplexed over one TCP connection, a single lost TCP packet will cause TCP to halt all streams until that packet is retransmitted. One lost packet for an image can delay the delivery of your CSS and JavaScript.

HTTP/3: Fixing the real head-of-line blocking with QUIC

HTTP/3 fixes the TCP-level HOLB problem by switching the transport layer. Instead of TCP, it uses a new protocol called QUIC, which runs on top of UDP.

QUIC re-implements the features of TCP (like reliability and congestion control) but with a crucial difference: its streams are independent. If a packet for one stream is lost, it only blocks that specific stream. Other streams on the same connection can continue processing data.

This is the definitive solution to HOLB.

Another major benefit of QUIC is a faster connection setup. It combines the TCP and TLS handshakes into a single, faster process. For subsequent connections to a known server, it can even achieve a "zero round-trip time" (0-RTT) handshake, sending application data in the very first packet. This is a significant latency reduction, especially on mobile networks.

How this changes your job (or doesn't)

You don't write code like fetch(url, { version: 'HTTP/3' }). The browser and server negotiate the highest protocol they both support automatically. Your job is to understand the implications and adjust your optimization strategies.

The big anti-pattern to call out in an interview is domain sharding. This was a hack for HTTP/1.1 where you'd spread assets across assets1.example.com, assets2.example.com, etc., to get around the 6-connection limit. With HTTP/2 and HTTP/3, this is counter-productive. It breaks the single-connection multiplexing benefit and adds unnecessary DNS lookups and connection overhead.

Instead, you should leverage resource hints. They work beautifully with modern protocols.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Optimized Page</title>

    <!--
      preconnect: Establishes a connection to a domain early.
      With HTTP/2 or HTTP/3, this single connection can then be
      reused for all subsequent requests to that domain.
    -->
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link rel="preconnect" href="https://cdn.example.com">

    <!--
      preload: Fetches a critical resource with high priority.
      HTTP/2 and HTTP/3 can multiplex this request alongside others
      without blocking.
    -->
    <link rel="preload" href="/styles/main.css" as="style">
    <link rel="stylesheet" href="/styles/main.css">

    <link rel="preload" href="/scripts/app.js" as="script">
    <script src="/scripts/app.js" defer></script>
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

preconnect pays off more because the connection it establishes can be efficiently reused. preload is more effective because the request can be multiplexed without getting stuck in a queue. You are giving the browser hints that align with how the underlying protocol works best.

Try it

Open DevTools in your browser and go to the Network tab. Right-click the table headers and enable the "Protocol" column. Visit a few major sites (Google, Facebook, Cloudflare, Netflix). See which protocol they use ("h2" for HTTP/2, "h3" for HTTP/3). Find a site using HTTP/3 and compare its perceived loading behavior to an HTTP/2 site, especially on a throttled connection.

Next: We'll break down the setup costs that HTTP/3 reduces in "TCP and TLS Handshakes: Connection Setup Costs".

Lock it in — apply this lesson under interview conditions.

Try a free mock interviewPractice system design problems
Next

TCP and TLS Handshakes: Connection Setup Costs