This page is a big collection of practical networking ideas and tools you’ll run into once you start building and deploying real applications, not just theory. We’ll cover everyday terminal commands, how secure web traffic works, the building blocks of modern backend architecture, how systems scale and cache data, containers, addressing, wireless tech, and a few protocols quietly working behind the scenes, like email and file transfer.
Common Commands
Ping, traceroute, curl, and other terminal tools for checking your network.
Web Protocols & Security
HTTP vs HTTPS, SSL/TLS, and how VPNs protect your traffic.
API & Backend Architecture
API gateways, reverse proxies, load balancers, and REST APIs.
Scaling, Performance & Caching
Scaling up vs out, caching layers, latency, throughput, and multiplexing.
Containers & Virtualization
What containers and VMs are, and when to use each.
IP Addressing & Local Networking
ARP, gateways, MAC addresses, public/private IPs, and VIPs.
Wireless & Mobile Networking
2G to 5G, Bluetooth, and mobile hotspots.
Application-Level Protocols
How email and file transfers actually work.
Legacy Technology
A quick look at ATM, an older networking technology.
SSL stands for Secure Sockets Layer. TLS stands for Transport Layer Security.
TLS is the newer, improved version of SSL. When people say “SSL” today, they usually mean TLS, but the name “SSL certificate” has stuck around even though modern systems actually run on TLS.
What they actually do:
Encryption - scrambles your data so only the intended receiver can read it.
Authentication - proves that the website you’re talking to is really who it says it is, and not a fake.
Data integrity - makes sure the data wasn’t changed while it was being sent.
How a TLS handshake works (simplified):
Client Hello - Your browser says, “Hello! Here are the encryption methods I support…”
Server Hello - The server replies, “Hello! Let’s use this encryption method. Here is my certificate.”
Certificate Check - Your browser checks if the certificate is valid and signed by a trusted Certificate Authority (CA).
Key Exchange - A shared secret key is created securely. Neither side actually sends the key itself, they mathematically agree on it together.
Handshake Complete - Both sides confirm everything is set. From here on, all communication is encrypted.
SSL Certificate:
A digital document that proves who owns a website.
Issued by trusted Certificate Authorities (CAs) like Let’s Encrypt, DigiCert, and Comodo.
Contains the website’s public key, its domain name, and an expiry date.
Browsers keep a built-in list of trusted CAs. If a certificate is signed by one of them, it’s automatically trusted.
Types of SSL Certificates:
DV (Domain Validated) - just proves you own the domain. Quick, cheap, and good enough for most websites.
OV (Organization Validated) - proves the organization behind the domain is real. Offers more trust.
EV (Extended Validation) - the highest level, used by banks. Shows the company name right in the browser bar.
graph LR
A[Your Device] --> B[Encrypted Tunnel]
B --> C[VPN Server]
C --> D[Internet]
D --> E[Website]
Your ISP only sees encrypted data heading to the VPN server, and the website sees the VPN server’s IP, not your real one.
Why use a VPN?
Privacy - your ISP can’t see which websites you visit, and websites can’t see your real IP address.
Security on public Wi-Fi - if you’re on cafe Wi-Fi, a hacker on the same network can’t spy on your traffic, since it’s encrypted.
Bypassing geo-restrictions - if a website is blocked in your country, you can connect through a VPN server in another country where it isn’t blocked.
Remote work - securely connect to your company’s private network from home. This was actually the original business use of VPNs.
How it works, technically:
You install a VPN app and connect to a VPN server (say, one in the USA).
Your device and the VPN server set up an encrypted tunnel using protocols like OpenVPN, WireGuard, or IKEv2.
All your internet traffic gets encrypted before it even leaves your device.
Your encrypted traffic travels to your ISP, then on to the VPN server.
The VPN server decrypts your traffic and sends it on to the destination website.
The response comes back to the VPN server, gets encrypted again, and is sent back to you.
Your device decrypts the response, and you see the webpage.
VPN Protocols:
WireGuard - modern, fast, and simple. Becoming the new standard.
OpenVPN - widely used, open source, and very reliable.
IKEv2/IPsec - fast, and works well on mobile since it handles switching networks smoothly.
L2TP/IPsec - older and slower.
PPTP - old and insecure. Avoid using it.
A VPN does NOT make you completely anonymous. The VPN provider can still see your traffic, so choose a trustworthy VPN that has a strict no-logs policy.
First, what’s an API? API stands for Application Programming Interface. Think of it like a waiter at a restaurant: you (the customer, or app) tell the waiter what you want, the waiter goes to the kitchen (the server or database), and brings back what you asked for. You never walk into the kitchen yourself.
An API Gateway works like the receptionist or front desk of a big company. Instead of every visitor walking straight into different departments, everyone checks in at the front desk first, and the front desk sends them where they need to go.
What an API Gateway does:
Acts as the single entry point for all client requests heading to your backend services.
Authentication - checks that you really are who you say you are before letting you in.
Rate Limiting - limits how many requests you can make, to prevent abuse.
Load Balancing - spreads requests across multiple servers.
Routing - sends each request to the right microservice.
Logging and Monitoring - keeps a record of all requests for later analysis.
SSL Termination - handles HTTPS so the internal services don’t have to.
Caching - saves common responses and returns them quickly without hitting the actual server.
Simple Example:
graph LR
A[Mobile App] --> G[API Gateway]
G --> U[User Service]
G --> P[Product Service]
G --> O[Order Service]
G --> PA[Payment Service]
Without an API Gateway, the mobile app would have to know the address of every single service, handle authentication separately for each one, and deal with each service individually. With an API Gateway, the app only needs to know one address.
A Load Balancer spreads incoming network traffic across multiple servers, so that no single server gets overloaded.
Why do we need it?
Imagine a very popular restaurant with only one cashier. The line gets long and slow. But add 5 cashiers and a manager who splits customers evenly between them, and everyone gets served much faster. That manager is the Load Balancer, and the cashiers are the servers.
Caching means storing a copy of data somewhere fast to access, so future requests for the same data can be served quickly without going all the way back to the original source.
Think of it like keeping your most-used pens on your desk instead of walking to the storage room every single time you need one.
Why Cache?
Database queries are slow and expensive.
Network requests take time.
If the same data is requested a thousand times, why compute it a thousand times? Compute it once, and store it.
Levels of Caching:
1. Browser Cache
Your browser saves copies of website resources (images, CSS, JS files) on your own computer.
The next time you visit the same site, it loads from your disk instead of downloading everything again.
That’s why your second visit to a website usually loads faster than the first.
Controlled by HTTP headers like Cache-Control and Expires.
2. CDN Cache (Content Delivery Network)
CDN servers spread around the world store copies of your website’s static files (images, videos, JS).
When a user in Mumbai visits your site, they get the files from a CDN server in Mumbai, instead of your actual server in the USA.
This cuts down latency dramatically.
3. Server-Side Cache (Application Cache)
The server stores the results of expensive database queries in fast memory (like RAM).
Common tools: Redis or Memcached.
Example: instead of querying the database every time someone asks for the top 10 products, store the result in Redis for 5 minutes.
4. Database Cache
Databases have their own internal cache (called a buffer pool) that keeps recently accessed data in memory.
Cache Invalidation: the hard problem
What happens when the data changes? You need to clear out the old cached data.
Strategies include:
TTL (Time To Live) - the cache expires after a set time (say, 5 minutes). Simple, but the data might be slightly outdated for a while.
Write-Through - whenever data is written to the database, the cache gets updated too. Consistent, but slower writes.
Cache Busting - add a version number or hash to file names, so the browser is forced to download the new version.
HTTP Cache Headers:
Cache-Control: max-age=3600 (cache for 1 hour)
Cache-Control: no-cache (always check back with the server)
Cache-Control: no-store (never cache this, used for sensitive data)
ETag: "abc123" (a unique ID for this version of the content)
The time delay for a single request to travel from the source to the destination and back.
Think of it as how long you have to wait for the first response.
Measured in milliseconds (ms).
Lower latency is better.
Example: you click a link, and your browser shows the first byte of the response in 50ms. That 50ms is the latency.
What affects latency:
The physical distance between client and server (the speed of light is the ultimate limit).
The number of routers in the path (each hop adds a bit of delay).
Network congestion.
Processing time on the server.
Throughput:
The amount of data transferred per second.
Think of it as how much work gets done in a given amount of time.
Measured in bits per second (bps, Mbps, Gbps), or requests per second (RPS).
Higher throughput is better.
Example: your system can process 1,000 requests per second, that’s its throughput.
The pipe analogy:
A garden hose is a thin pipe (low throughput), but water comes out right away (low latency).
An oil pipeline is a huge pipe (high throughput), but takes hours for oil to travel from one end to the other (high latency).
The trade-off:
Sometimes improving throughput can increase latency. For example, batching many small requests together into one big one moves more data overall, but each individual request waits longer.
Video streaming cares more about throughput, since data needs to flow continuously.
Real-time gaming cares more about latency, since every millisecond counts.
Multiplexing is the technique of combining multiple signals or data streams into one shared channel, and then separating them again at the other end.
Simple Analogy: A highway has many lanes. Many cars (signals) can travel on the same highway (the medium) at the same time without getting in each other’s way. Multiplexing is like creating those lanes.
Why Multiplexing?
Physical cables and wireless channels are expensive.
Without multiplexing, you’d need a separate cable for every single communication.
Multiplexing lets many communications share the same physical medium efficiently.
Types of Multiplexing:
1. FDM - Frequency Division Multiplexing
Different signals use different frequency ranges (bands) on the same medium, at the same time.
Like FM radio, many stations broadcast at once, and you tune into different frequencies to pick up different stations. Every station uses the same air, just a different frequency.
Used in: cable TV, radio broadcasting, ADSL internet.
2. TDM - Time Division Multiplexing
Each signal gets a dedicated time slot to use the full channel, one after another, cycling very quickly.
Like several people taking turns talking on a walkie-talkie, very fast.
Used in: phone networks, older digital communication.
3. WDM - Wavelength Division Multiplexing
Used in fibre optic networks. Different signals use different wavelengths of light on the same fibre.
Like sending red light, blue light, and green light through the same fibre at the same time, each carrying different data.
DWDM (Dense WDM) can pack hundreds of channels onto a single fibre, giving incredible bandwidth.
In HTTP/2 - Multiplexing over one TCP connection:
HTTP/1.1: every request needed its own TCP connection, or had to wait in line.
HTTP/2: multiple requests can be sent over one TCP connection at the same time (multiplexed).
Result: much faster web pages, because the browser doesn’t have to wait for one request to finish before starting the next.
A container is a way to package an application together with everything it needs to run (code, runtime, libraries, settings) into one isolated unit.
Think of it like a shipping container on a cargo ship. The container keeps everything inside neatly packed and isolated. You can place the same container on any ship (any server), and it works exactly the same way.
The Problem Containers Solve:
“It works on my machine!” is a very common developer headache.
Your app works fine on your laptop, but breaks on the production server, because they have different configurations, different library versions, and different OS settings.
Containers package everything together, so it works the same way everywhere.
What is inside a Container?
Your application code
The runtime (like Node.js, Python, Java)
Libraries and dependencies
Configuration files
Container vs Traditional Deployment:
Without containers: “Install Python 3.9, install these 20 libraries, set these environment variables, configure this file…”
With containers: docker run my-app, and you’re done!
Docker is the most popular tool for creating and running containers.
Terminal window
# Simple Docker commands
dockerpullnginx# download nginx container image
dockerrun-p80:80nginx# run nginx, expose port 80
dockerps# list running containers
dockerstop<container-id># stop a container
dockerimages# list downloaded images
Containers vs VMs, a quick comparison:
Both isolate your app from the host system.
VMs include a full operating system, which is heavy, slow to start, and uses lots of RAM.
Containers share the host OS kernel, which makes them lightweight, fast to start (in seconds), and light on RAM.
graph TD
PS[Physical Server] --> H[Hypervisor]
H --> VM1["VM 1: full OS + App 1 (~2GB RAM)"]
H --> VM2["VM 2: full OS + App 2 (~2GB RAM)"]
H --> VM3["VM 3: full OS + App 3 (~2GB RAM)"]
At Layer 3 (the Network Layer), computers use IP addresses.
At Layer 2 (the Data Link Layer), computers use MAC addresses.
When your computer wants to send data to another device on the same local network, it knows the IP address, but it still needs to find the MAC address to actually deliver the data.
ARP is the protocol that finds this MAC address.
How ARP Works:
Your computer wants to send data to 192.168.1.5 on your local network.
It doesn’t know the MAC address of 192.168.1.5 yet.
It sends an ARP Request as a broadcast to ALL devices on the network:
“Hey everyone! Who has IP address 192.168.1.5? Tell me your MAC address!”
Every device receives this, but only the device with IP 192.168.1.5 replies:
“That’s me! My MAC address is AA:BB:CC:DD:EE:FF”
Your computer saves this in its ARP cache (a temporary table of IP-to-MAC mappings), so it doesn’t have to ask again soon.
Now your computer can send the data frame directly to that MAC address.
ARP Cache:
Terminal window
arp-a# View the ARP cache on your computer
ARP Spoofing (a Security Risk):
A hacker can send fake ARP replies, claiming “I am the IP you’re looking for, here is MY MAC address.”
Now traffic that was meant for another device gets sent to the hacker instead.
People often mix these two up. Here’s the clear difference:
Router:
A specific type of device that connects multiple networks and forwards data between them.
Reads IP addresses and decides the best path for packets.
Operates at Layer 3 (Network Layer) of the OSI model.
Example: your home Wi-Fi router connects your home LAN to the internet.
Gateway:
A more general concept, any device that acts as an entry or exit point between two different networks.
Can translate between different protocols, not just forward packets like a router does.
A gateway can work at any OSI layer.
A router is actually ONE TYPE of gateway.
Example: a gateway between a corporate network (using TCP/IP) and an older mainframe network (using a different protocol) would translate between the two.
Simple way to remember:
Every router is a gateway, since it acts as a gate between networks.
But not every gateway is a router, since a gateway might also do extra translation work.
Default Gateway:
Your “default gateway” is the router that your device sends traffic to whenever it doesn’t know where else to send it.
Usually your home router, at an address like 192.168.1.1 or 192.168.0.1.
When your computer wants to reach something outside your local network, like the internet, it sends the data to the default gateway (your router), which then handles getting it to the right destination.
IP addresses used within a private network, like your home, office, or school.
Not routable on the public internet, they only make sense inside your local network.
Assigned by your router using DHCP.
Private IP address ranges:
10.0.0.0 to 10.255.255.255 (10.x.x.x)
172.16.0.0 to 172.31.255.255 (172.16-31.x.x)
192.168.0.0 to 192.168.255.255 (192.168.x.x), the most common range in homes
Public IP Address:
A unique IP address that’s visible on the internet.
Assigned to you by your Internet Service Provider (ISP).
Every device in your home usually shares ONE public IP, your router’s IP.
Websites see your public IP, not the private IPs of your individual devices.
How NAT makes this work:
Your house might have 10 devices (phones, laptops, a smart TV) all using private IPs like 192.168.1.2 through 192.168.1.11. But your router only has one public IP, something like 203.0.113.5.
When any device accesses the internet, your router’s NAT (Network Address Translation) replaces the private IP with the public IP. When the response comes back, NAT figures out which device it was meant for, and forwards it to the right private IP.
graph LR
L["Your laptop (192.168.1.5)"] --> N[Router NAT]
P["Your phone (192.168.1.6)"] --> N
N --> I["Internet (appears as 203.0.113.5)"]
A Virtual IP (VIP) is an IP address that doesn’t belong to one specific physical machine. Instead, it can float between machines, since the address is shared or reassigned depending on which server is currently active.
Why is this useful?
Use Case 1: High Availability
You have two servers, and the primary one handles all the traffic.
Both servers share a VIP (say 10.0.0.100).
Your DNS points to the VIP.
If the primary server goes down, the VIP automatically moves over to the backup server.
Users keep using the same IP or domain, and notice no interruption at all.
This is called failover.
Use Case 2: Load Balancing
The Load Balancer itself has a VIP.
All users connect to that VIP.
The Load Balancer then distributes traffic to the real servers behind it.
Bluetooth is a short-range wireless technology for connecting devices directly to each other, without needing the internet.
Simple explanation: Bluetooth lets your phone talk to your earphones, your keyboard, your speaker, or your car, all without cables, over short distances.
How it works:
Bluetooth uses radio waves in the 2.4 GHz frequency band.
It uses a technique called FHSS (Frequency Hopping Spread Spectrum), which hops between 79 different frequencies, 1600 times every second! This makes it very resistant to interference.
Range: typically 10 meters (Class 2) up to 100 meters (Class 1).
Speed: depends on the version. Bluetooth 5.0 can do up to 2 Mbps in basic mode, or 48 Mbps in High Speed mode.
Bluetooth Versions:
Bluetooth 1.0 (1999) - very slow, 0.7 Mbps
Bluetooth 2.0 + EDR (2004) - 3 Mbps, more efficient
Bluetooth 3.0 + HS (2009) - 24 Mbps (uses Wi-Fi radio for data)
Bluetooth 4.0 (2010) - introduced BLE (Bluetooth Low Energy) for IoT devices like fitness trackers and sensors
Bluetooth 5.0 (2016) - longer range, faster, better for IoT
Pairing Process:
Device A broadcasts that it’s “discoverable”.
Device B scans for nearby devices and finds Device A.
The two devices exchange a pairing request.
Sometimes a PIN or pairing code needs to be confirmed (a security step).
Both devices exchange a link key (an encryption key).
Future connections reuse this key, so there’s no need to pair again.
Bluetooth vs Wi-Fi:
Bluetooth: short range (10m), low power, device-to-device, doesn’t need the internet.
Wi-Fi: long range (100m+), higher power, connects to a network or the internet.
Sending an email seems simple, you type something and hit send. But there’s a fairly complex system working behind the scenes.
The key protocols:
SMTP (Simple Mail Transfer Protocol) - used to send emails. Port 25 or 587.
POP3 (Post Office Protocol 3) - used to receive emails, downloading them onto your device. Port 110.
IMAP (Internet Message Access Protocol) - used to access emails while they stay on the server, you just view them. Port 143. Better than POP3 when you use multiple devices.
You compose and send - Gmail’s client (your browser or app) sends your email to Gmail’s SMTP server using SMTP.
Gmail’s SMTP server receives the email.
DNS Lookup - Gmail’s server needs to find Yahoo’s mail server, so it looks up the MX (Mail Exchange) DNS record for yahoo.com. This returns Yahoo’s mail server address.
Gmail sends to Yahoo - Gmail’s SMTP server connects to Yahoo’s incoming mail server and delivers the email using SMTP.
Yahoo stores the email on its mail server, in Bob’s mailbox.
Bob opens his email - Bob’s email client (Yahoo Mail in a browser, or an app like Outlook) connects to Yahoo’s server using IMAP or POP3.
Bob sees the email - it’s fetched from the server and displayed in Bob’s client.
graph LR
A["Alice's App"] --> G["Gmail SMTP Server"]
G -->|DNS lookup for MX record| Y["Yahoo SMTP Server"]
Y --> M["Bob's Mailbox"]
M -.->|IMAP / POP3| B["Bob's App"]
Spam and Security:
Emails can be faked (spoofed), anyone can put any “From” address on an email.
SPF (Sender Policy Framework) - a DNS record that lists which servers are allowed to send email for this domain.
DKIM (DomainKeys Identified Mail) - adds a digital signature to emails, so the receiver can verify they really came from who they claim to be from.
DMARC - a policy that decides what to do with emails that fail SPF or DKIM checks: reject them, quarantine them, or allow them through anyway.
Files are transferred over networks using a few different protocols, each designed for that purpose.
FTP - File Transfer Protocol:
One of the oldest file transfer protocols, created all the way back in 1971!
Port 21 (for commands), Port 20 (for data).
Two modes:
Active Mode - the server connects back to the client for data. Can cause problems with firewalls.
Passive Mode - the client opens both connections. Works better with firewalls.
Not encrypted, the username, password, and data are all sent in plain text. Very insecure.
FTPS - FTP Secure:
FTP with SSL/TLS encryption added. The secure version of FTP.
SFTP - SSH File Transfer Protocol:
Not actually related to FTP, despite the similar name!
Works over SSH (Secure Shell), so everything is encrypted.
Port 22 (same as SSH).
The go-to choice for secure file transfers, and widely used by developers.
Terminal window
# SFTP commands
sftpusername@server.com
sftp> ls# list files on server
sftp> getfile.txt# download file
sftp> putlocalfile.txt# upload file
sftp> exit
HTTP/HTTPS for file transfers:
Downloading a file from a website is really just an HTTP request.
The curl and wget commands use HTTP/HTTPS to download files.
Most modern file sharing services use HTTPS.
SCP - Secure Copy:
Copies files over SSH. Simple, but doesn’t support interactive browsing.
Terminal window
scplocalfile.txtusername@server.com:/remote/path/
scpusername@server.com:/remote/file.txt./local/
Torrent (P2P):
The BitTorrent protocol: instead of downloading from one server, you download different pieces of the file from many peers (other people who already have the file) at the same time.
Much faster for popular files, since the load gets spread out.
Doesn’t need a central server to host the file.
How a typical download works:
You click a download link on a website.
Your browser sends an HTTP GET request to the server.
The server responds with the file data.
Your browser saves the incoming data to your storage, piece by piece.
Once all the data has arrived, the file is complete.
ATM - Asynchronous Transfer Mode (not the bank machine! This is a networking technology.)
ATM (in networking) is a high-speed networking technology that was widely used in the 1990s and early 2000s for telecommunications networks, like phone company backbone networks.
Key idea: Fixed-size cells
Unlike most protocols, which use variable-size packets, ATM uses fixed-size cells of exactly 53 bytes (a 5-byte header plus a 48-byte payload).
Because every cell is the same size, ATM switches can process them extremely fast and predictably.
Why fixed size?
Predictable performance, great for time-sensitive traffic like voice and video calls.
Hardware switches can be optimized for exactly 53 bytes.
Consistent latency.
ATM Key Features:
Very fast, designed for high-speed backbone networks (155 Mbps to 10 Gbps).
Connection-oriented, a virtual circuit has to be set up before any data is sent.
QoS (Quality of Service), can guarantee bandwidth and delay limits for different types of traffic, which is critical for voice calls.
Can carry multiple types of traffic, voice, video, and data, over the same network.
ATM in Telecom:
Used by telecom companies to carry phone calls digitally.
Voice calls were converted into ATM cells and sent across the network.
This allowed voice and data to share the same physical lines.
ATM today:
ATM has mostly been replaced by Ethernet and IP, even within telecom networks.
Modern telecom networks tend to use technologies like MPLS instead.
You’ll rarely run into ATM in new deployments, but it’s still worth understanding for history and legacy systems.
Why did ATM lose?
The fixed 53-byte cell carries overhead, the 5-byte header is fairly large compared to the 48-byte payload (nearly 10% overhead).
IP and Ethernet became dominant for data, making it simpler to just use them for everything.