Back to articles
Network Protocols: A Senior Engineer's Guide
How-ToSystems

Network Protocols: A Senior Engineer's Guide

via Dev.toArghya Majumder

Network Protocols: A Senior Engineer's Guide A comprehensive guide to REST, GraphQL, WebSockets, and SSE for system design interviews. 1. REST (Representational State Transfer) REST is the foundation of most web communication, built on the stateless nature of HTTP . Transport Mechanism Operates primarily over HTTP/1.1 or HTTP/2: Version Behavior HTTP/1.1 Each request usually requires a new TCP connection (or reuses with overhead) HTTP/2 Multiplexes multiple requests over a single connection to reduce latency The "Over-fetching" Problem A major architectural drawback of REST is that endpoints return a fixed data structure . GET /users/1 // You only need the name, but you get everything: { "id": 1, "name": "John", "email": "john@example.com", "address": { ... }, "orderHistory": [ ... ], // 50KB of data you don't need "preferences": { ... } } Result: Wasting bandwidth and browser memory. Caching Strategy (REST's Superpower) REST is uniquely powerful because it leverages standard HTTP cach

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles