DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question
← From Beginner to Expert in Fundamentals of Frontend
  • How the Web Works
  • Browsers: The Engines
  • Networking & Latency
  • HTTPS & TLS Handshake
  • CDNs & Edge Computing
  • WebSockets & WebRTC
  • RESTful Architecture
  • GraphQL Architecture
  • CORS (Cross-Origin Resource Sharing)
  • Load Balancing
  • Critical Rendering Path Deep Dive
  • DOM vs. CSSOM Construction
  • The Rendering Engine: Layout, Paint, Compositing
  • JavaScript Engine: V8 Internals
  • The Event Loop: Macro vs. Micro Tasks
  • Garbage Collection
  • Browser Storage Architecture
  • Service Workers & PWAs
  • Web Workers: Multi-Threading
← From Beginner to Expert in Fundamentals of Frontend

Networking & Latency

30 min read
TCP vs UDPSSL HandshakesTLS 1.3TTFBCDNs4G/5GLatency

Why "Fast" Code Can Still Feel Slow

Your code might execute in microseconds, but if it takes 3 seconds to reach the user over a 4G connection, the user experience is ruined.

TCP vs UDP

TCP (Transmission Control Protocol) guarantees delivery with a 3-way handshake (SYN → SYN-ACK → ACK). UDP (User Datagram Protocol) is faster but doesn't guarantee delivery — used for video streaming and gaming.

SSL/TLS Handshakes

HTTPS adds another round-trip for the TLS handshake. TLS 1.3 reduces this to a single round trip, and supports 0-RTT resumption for returning visitors.

TTFB (Time to First Byte)

The time between the browser sending a request and receiving the first byte of the response. A good TTFB is under 200ms. Factors: server processing time, network latency, and CDN proximity.

CDNs (Content Delivery Networks)

CDNs cache your static assets on servers worldwide. A user in Mumbai gets your files from a nearby edge server instead of your origin server in Virginia.

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.