Networking fundamentals matter for frontend, backend, and cloud engineering.
OSI and TCP/IP
The OSI model has seven layers:
- Physical
- Data Link
- Network
- Transport
- Session
- Presentation
- Application
TCP/IP is often simplified into four layers: network interface, internet, transport, and application.
TCP and UDP
TCP is connection-oriented and reliable. It uses a three-way handshake and a four-way teardown. It is suitable for file transfer, web requests, and database connections.
UDP is connectionless and lightweight. It does not guarantee delivery. It is suitable for real-time audio/video, games, and DNS.
HTTP and HTTPS
HTTP is plaintext. HTTPS adds TLS encryption.
Common methods:
GET: readPOST: createPUT: full updatePATCH: partial updateDELETE: delete
Common status codes:
200: success301/302: redirect400: bad request401: unauthenticated403: forbidden404: not found500: server error
DNS and CDN
DNS resolves domain names into IP addresses. CDN caches static assets at edge locations closer to users.
WebSocket
WebSocket is a long-lived connection protocol. It is useful for chat, notifications, and collaborative editing.
HTTP/2
HTTP/2 improves over HTTP/1.1 with multiplexing, header compression, and more efficient connection reuse.