DNS (Domain Name System)
What: DNS translates human-readable domain names like designgurus.io into the numeric IP addresses that computers use to locate each other.
Why: Without it, users would have to memorize IP addresses for every site. DNS is also the first step in every web request, which makes it a quiet performance factor.
When: Everywhere. Interviewers rarely ask you to design DNS, but they expect you to know it is part of the request path.
Load Balancer
What: A component that sits in front of your servers and spreads incoming traffic across them using algorithms like round-robin, least connections, or IP hash.
Why: Without a load balancer, one server would get all the traffic while others sit idle. Load balancers also provide failover when a server goes down.
When: The moment you have more than one server, you have a load balancer, even if it's just DNS round-robin. It is the most common first component added when a system starts to scale.
API Gateway
What: A single entry point that sits in front of many backend services. It handles routing to the right service, authentication, rate limiting, and request transformation.
Why: Clients shouldn't know about your internal service layout. An API gateway hides that complexity and gives you a place to enforce cross-cutting concerns like auth and rate limits.
When: Microservices architectures, external APIs consumed by third parties, or any system where you want a single policy-enforcement point.
Proxy and Reverse Proxy
What: A proxy sits between a client and the internet, forwarding requests on behalf of the client. A reverse proxy sits between the internet and your servers, forwarding requests on behalf of the server.
Why: Proxies add caching, security filtering, and logging without changing the client or server. Reverse proxies are also where TLS termination and load balancing often happen.
When: Every production web system has at least one reverse proxy in front of it. Forward proxies show up in corporate networks and content filtering systems.
CDN (Content Delivery Network)
What: A geographically distributed network of servers that cache static content (images, videos, scripts) close to users so requests don't have to travel to your origin server.
Why: The speed of light is a real limit. A user in Tokyo requesting content from a server in Virginia will always be slower than a user in Tokyo getting it from a nearby CDN edge.
When: Any system serving static assets to a global audience. Also increasingly used for dynamic content caching and edge computing.
REST vs RPC
What: Two styles of API design. REST treats APIs as operations on resources using standard HTTP verbs. RPC treats APIs as remote function calls, often with a more efficient binary format like gRPC.
Why: The style you pick affects how clients use your system, how you evolve the API, and how much overhead each call has. REST is simpler and more cache-friendly. RPC is typically faster and better for internal service-to-service calls.
When: REST for public APIs and browser-facing endpoints. gRPC or other RPC for high-throughput internal service communication.
WebSockets
What: A protocol that upgrades an HTTP connection into a persistent, bidirectional channel. Either side can push data at any time without the client needing to poll.
Why: HTTP is request-response only. Anything real-time (chat, live notifications, multiplayer games) needs a push channel, and polling is wasteful.
When: Real-time features like chat, live dashboards, collaborative editing, and presence indicators.
Long Polling vs Server-Sent Events
What: Two lighter-weight alternatives to WebSockets. Long polling keeps a request open until the server has data. Server-Sent Events (SSE) uses a persistent HTTP response to stream one-way updates from server to client.
Why: Both let the server push without the complexity of a full bidirectional WebSocket connection. SSE is especially good when you only need server-to-client updates.
When: Long polling when you need a fallback for environments that block WebSockets. SSE for notification feeds, live scores, or stock tickers.