Networking Basics for System Design: A Beginner’s Guide

Author

Kritim Yantra

Mar 31, 2025

Networking Basics for System Design: A Beginner’s Guide

If you're diving into system design, understanding networking basics is crucial. Whether you're building a small app or a large-scale service, knowing how computers communicate will help you design better systems.

In this blog, we’ll break down networking concepts in simple terms—no jargon, just clear explanations.


1. What is Networking?

Networking is how computers (or servers) talk to each other over the internet or a local network.

Real-World Example:

Think of networking like sending a letter:

  • Your Computer = Sender
  • Router/ISP = Postal Service
  • Server (e.g., Google) = Receiver

The internet is just millions of computers sending and receiving "letters" (data packets).


2. Key Networking Terms You Must Know

A. IP Address (Internet Protocol Address)

  • Every device connected to the internet has a unique IP address (like a home address).
  • Example: 192.168.1.1 (IPv4) or 2001:0db8:85a3::8a2e:0370:7334 (IPv6).

B. DNS (Domain Name System)

  • Converts human-readable names (like google.com) into IP addresses.
  • Example: When you type facebook.com, DNS finds its IP (31.13.65.36) so your browser can load it.

C. HTTP/HTTPS (HyperText Transfer Protocol)

  • Rules for sending/receiving web pages.
  • HTTPS = HTTP + Encryption (secure version).

D. TCP vs. UDP

Feature TCP (Reliable) UDP (Fast)
Connection Establishes a connection first No connection needed
Speed Slower (checks for errors) Faster (no error checks)
Use Case Web browsing, emails Video calls, gaming

E. Port Numbers

  • Like "doors" on a computer where services run.
  • Example:
    • 80 → HTTP (Web)
    • 443 → HTTPS (Secure Web)
    • 22 → SSH (Remote Login)

F. API (Application Programming Interface)

  • A way for two apps to communicate (e.g., Facebook API lets apps fetch user data).

3. How Does Data Travel Over the Internet?

When you visit a website (e.g., youtube.com), here’s what happens:

  1. Your computer asks DNS: "What’s the IP of youtube.com?"
  2. DNS responds with YouTube’s server IP (e.g., 142.250.190.46).
  3. Your browser sends an HTTP request to that IP.
  4. YouTube’s server sends back the webpage (HTML, CSS, JavaScript).
  5. Your browser renders the page.

This happens in milliseconds!


4. Common Networking Models

A. Client-Server Model

  • Client (your phone/laptop) requests data.
  • Server (remote computer) sends the response.
  • Example: Loading a website, using an app.

B. Peer-to-Peer (P2P) Model

  • Devices communicate directly without a central server.
  • Example: Torrenting, Bitcoin.

5. Important Networking Protocols

Protocol Purpose Example
HTTP/HTTPS Fetch web pages Loading amazon.com
FTP File transfers Uploading files to a server
SMTP Sending emails Gmail sending a message
WebSocket Real-time communication Chat apps like WhatsApp
gRPC Fast API communication Microservices talking

6. Networking in System Design

When designing systems, you must consider:

A. Latency vs. Bandwidth

  • Latency = Time taken for data to travel (e.g., 50ms).
  • Bandwidth = Amount of data sent per second (e.g., 100 Mbps).

Example:

  • High latency = Slow video calls (lag).
  • Low bandwidth = Buffering on Netflix.

B. Load Balancing

  • Distributes traffic across multiple servers to avoid overloading one.
  • Example:
    • Without load balancer → 1 server crashes if too many users visit.
    • With load balancer → Traffic splits between 3 servers.

C. CDN (Content Delivery Network)

  • Stores copies of files (images, videos) in multiple locations for faster access.
  • Example: Netflix uses CDNs so movies load quickly worldwide.

D. Caching

  • Stores frequently accessed data closer to users (in memory).
  • Example:
    • Browser cache → Faster reloading of visited sites.
    • Redis cache → Speeds up database queries.

7. Networking Problems & Solutions

Problem Solution
Server Overload Use load balancers
Slow Website Use CDN + Caching
Security Risks Use HTTPS, Firewalls
Network Failures Retry mechanisms (e.g., auto-reconnect)

8. Summary: Key Takeaways

IP Address = Unique computer identifier.
DNS = Converts domain names to IPs.
TCP (Reliable) vs. UDP (Fast) = Choose based on needs.
Load Balancing & CDNs = Improve speed & reliability.
Caching = Reduces database load.


Final Thoughts

Networking is the backbone of system design. The better you understand it, the more scalable and efficient your systems will be.

Tags

System Design

Comments

No comments yet. Be the first to comment!

Please log in to post a comment:

Continue with Google

Related Posts