Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Network Infrastructure & Services
CN

Network Infrastructure & Services

How big scale systems work: Master Firewalls, Proxy servers, Load Balancers, and CDNs.

Firewall

A network security device that monitors and controls traffic based on security rules.

TypeHow it worksSpeed
Packet filterExamines IP headers (source/dest IP, port)Fast
StatefulTracks connection state (allows return traffic)Moderate
Application (L7)Inspects payload content (e.g., SQL injection)Slowest but safest

Default rule: block all inbound traffic. Allow only specific ports (80, 443) for web servers.

Proxy Servers

An intermediary between clients and servers.

TypeWhat it hidesUse case
Forward proxyClient identityCompany: all employees browse through it; content filtering, caching, anonymity
Reverse proxyServer identityNginx/haproxy in front of web servers: load balancing, SSL termination, caching

Load Balancer

Distributes incoming traffic across multiple backend servers.

AlgorithmHow it works
Round RobinEach server gets a turn in sequence
Least ConnectionsSend to server with fewest active connections
IP HashConsistent server based on client IP (session persistence)
WeightedServers with higher capacity get more traffic

Benefits: High availability (if one server fails, traffic goes to others), scalability (add more servers), maintenance without downtime.

CDN (Content Delivery Network)

  • Distributed servers that cache content geographically close to users
  • Static content: images, CSS, JS, video
  • Dynamic content acceleration: optimized routes back to origin
  • DDoS protection: absorbs attack traffic across the distributed network
  • Examples: Cloudflare, Akamai, Fastly

VPN (Virtual Private Network)

Encrypted tunnel between client and a remote network. Extends a private network across a public network (the internet). Common uses: secure remote access to corporate networks, bypassing geo-restrictions.

Q: How does a CDN improve performance?

A: By caching content at edge servers geographically close to users. A user in India gets files from a Mumbai edge server instead of the origin server in California — latency drops from 200ms to 10ms.

Q: Why do we need a Load Balancer?

A: High availability (if a server fails, traffic routes to healthy ones), scalability (add servers behind the balancer without changing DNS), and no-downtime maintenance (take a server out of rotation for updates).

Q: What is a Reverse Proxy?

A: A server in front of web servers that forwards client requests. Used for: load balancing, SSL termination (decrypt HTTPS once, send plain HTTP to backend), caching, security (hides backend topology), and compression.

Q: Difference between REST and HTTP?

A: HTTP is a protocol (transport layer for web). REST is an architectural style for designing APIs using HTTP methods (GET, POST, PUT, DELETE) with stateless resource-oriented operations. REST leverages HTTP but adds design constraints.

My Private Notes

Notes are auto-saved locally to this device.