Networking Basics in System Architecture

basic · System Architecture

Networking Basics for Distributed Systems In a distributed system, components cannot collaborate unless they can communicate reliably across a network. When a user clicks a button on a client application, that action triggers a cascade of data packets moving across global routers. Understanding system architecture requires mastering the foundational protocols that govern how these packets find their destinations and maintain data integrity. 1. The Digital Coordinates: IP Address An IP (Internet Protocol) Address is a unique numerical label assigned to every device (server, client, router) connected to a computer network. It acts as a digital mailing address, allowing data packets to be routed accurately across the internet. Relational infrastructure utilizes two primary IP formatting standards: IPv4 (Internet Protocol version 4): A 32-bit numeric address expressed as four decimal numbers separated by dots (e.g., 192.168.1.50 ). Because it uses 32 bits, the maximum theoretical pool is

Careeroza — One-stop Zone for Aspirants

Study material, Careeroza mentorship, tech jobs, and career guidance on careeroza.com.

Public study materials

^{32}$ (roughly 4.3 billion addresses), which has been completely exhausted by the global expansion of internet devices. IPv6 (Internet Protocol version 6): A 128-bit alphanumeric address written in hexadecimal format and separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334 ). With a massive layout capacity of

Careeroza — One-stop Zone for Aspirants

Study material, Careeroza mentorship, tech jobs, and career guidance on careeroza.com.

Public study materials

^{128}$ addresses, it ensures the internet can scale infinitely. Network Boundary Domains Public IP Addresses: Globally unique addresses visible to the entire internet. A public IP is required for any server that needs to accept incoming requests from external web users or public client applications. Private IP Addresses: Internal addresses used within an isolated private network, such as a local home Wi-Fi network or a cloud provider's VPC (Virtual Private Cloud) . Private IPs are invisible to the public internet, allowing backend app servers and database nodes to communicate with absolute security without exposing their ports to external attackers. 2. The Internet's Phonebook: DNS (Domain Name System) Computers communicate entirely using numerical IP addresses, but humans remember words much better than numbers. The DNS (Domain Name System) is a decentralized network service that acts as the phonebook of the internet, translating human-readable domain names into machine-readable IP addresses. The Step-by-Step DNS Resolution Pipeline When a client types a domain name into a browser, the system executes a sequential lookup chain: The Browser Cache: The operating system checks its local memory cache to see if it has looked up this domain recently. If it has, it bypasses the network entirely. The DNS Recursive Resolver: If the IP is missing from the cache, the request travels to a recursive resolver (typically managed by your ISP or a global provider like Cloudflare's 1.1.1.1 ). The resolver is responsible for hunting down the IP address across the internet. The Root Server: The resolver queries a global Root Server ( . ). The root server doesn't know the IP, but it reads the top-level suffix of the domain and tells the resolver where to find the specialized TLD (Top-Level Domain) Server handling that extension. The TLD Server: The resolver jumps to the TLD Server (managing .com , .org , etc.). The TLD server inspects the domain name and redirects the resolver to the domain's specific Authoritative Nameserver . The Authoritative Nameserver: This is the final resting place of the domain's real DNS records. It fetches the specific A Record (mapping text to an IPv4 address), and passes the IP address back through the resolver straight to the client browser. The browser can now open a direct network connection to that server IP. 3. The Data Transport Layer Protocols Once an IP address is resolved, data must be broken down into small chunks called Packets to transit the physical network wires. At this point, systems architects must choose a specific transport protocol based on their performance and consistency needs. THE TRANSPORT LAYER SEPARATION │ ┌─────────────────────────────┴─────────────────────────────┐ ▼ ▼ TCP (Transmission Control Protocol) UDP (User Datagram Protocol) • Connection-oriented, strict handshakes. • Connectionless, fires data blindly. • Enforces absolute packet delivery order. • Zero packet tracking or delivery checks. • Ideal for web traffic, APIs, and databases. • Ideal for live video streaming and gaming. A. TCP (Transmission Control Protocol) TCP is a connection-oriented transport protocol designed for applications that require absolute reliability and strict data accuracy over raw speed. The Three-Way Handshake: Before TCP transmits a single byte of data, it forces the client and server to establish a secure, verified connection channel through an explicit packet handshake protocol: THE TCP THREE-WAY HANDSHAKE CLIENT SERVER ┌──────────────┐ ┌──────────────┐ │ Sends SYN │ ─────────────────────────────────────────► │ Receives SYN │ │ (Synchronize)│ └──────┬───────┘ └──────────────┘ │ ▲ ▼ │ ┌──────────────┐ └─────────────────────────────────────────────────── │Sends SYN-ACK │ └──────────────┘ ┌──────────────┐ ▲ │ Sends ACK │ ──────────────────────────────────────────────────┘ │(Acknowledge) │ └──────┬───────┘ │ ▼ [Connection Open: Data Begins Flowing] Reliability Guarantees: TCP numbers every single packet it transmits. If a packet is dropped or corrupted in transit due to network jitter, the receiver notices the missing number and forces the sender to retransmit it. Furthermore, it rearranges incoming packets back into their exact correct sequential order before passing them up to the application software. Production Use Cases: Standard web applications (HTTP/HTTPS), REST and GraphQL APIs, database connections, and file transfers (SSH, FTP) where a single missing byte would corrupt the entire payload. B. UDP (User Datagram Protocol) UDP is a connectionless , lightweight transport protocol designed for applications that prioritize ultra-low latency and raw transmission speed over absolute data accuracy. Fire-and-Forget Mechanics: UDP skips the three-way handshake entirely. It streams packets (called datagrams) straight to the destination IP address blindly without checking if the server is online, ready, or even exists. Zero Guarantees: UDP has no tracking mechanisms. It doesn't care if packets are dropped, delayed, or arrive completely out of order. If a packet is lost on the wire, it is gone forever; the protocol never attempts a retransmission. This complete lack of overhead makes UDP exceptionally fast. Production Use Cases: Real-time video conferencing (Zoom, Teams), live streaming, online multiplayer video games, DNS lookups, and IoT sensor metrics streams where processing a late, retransmitted packet is useless because the system has already moved on to the next live frame. Networking Protocols Comparison Reference Matrix Feature/Attribute TCP Protocol Vector UDP Protocol Vector Connection Profile Connection-Oriented. Requires an explicit three-way handshake setup before transmission. Connectionless. Streams data instantly to target addresses with no operational preamble. Delivery Guarantees Absolute. Retransmits lost packets automatically and guarantees correct data order. None. Packets can be completely lost or arrive out of sequence without triggering errors. Overhead & Speed Higher overhead due to large packet headers, error tracking, and receipt confirmations. Minimal overhead. Smaller packet sizes lead to high throughput and ultra-low latency. Flow Control Mechanics Built-in. Prevents sender from overwhelming receiver or choking congested network pipes. None. Streams data continuously at the application's maximum processing speed. Primary System Use Cases Microservice REST/gRPC APIs, banking ledgers, web browsers, database queries. Video streaming codecs, VoIP calls, live server monitoring telemetry, DNS inquiries.

Back to System Architecture

Browse all study material on Careeroza