📝 Topics Covered

  1. 1. Introduction to System Design
  2. 2. Client-Server Architecture
  3. 3. Monoliths vs. Microservices
  4. 4. Remote Procedure Calls & gRPC
  5. 5. Foundational Network Protocols
  6. 6. Proxies: Forward & Reverse

1. Introduction to System Design

System Design is the structured process of identifying, creating, and designing scalable systems that meet specific business objectives, performance constraints, and operational goals.

Instead of focusing on single lines of code, system design is a macroscopic discipline covering system analysis, architectural patterns, APIs, caching mechanisms, and data flow synchronization.

1.1 Core System Design Objectives

  • Optimized Costs: Minimizing infrastructure expenses and ongoing engineering maintenance efforts.
  • Elastic Scalability: The ability of the system to scale resource capacity dynamically to meet demand spikes.
  • Low Latency & High Throughput: Minimizing end-to-end response delay while maximizing transactions processed per second.
  • High Availability & Strong Consistency: Achieving maximum uptime (99.999% SLA) and maintaining data consistency across nodes.

1.2 Elements of System Design

  • Logical Entities:
    • Data payloads
    • Relational/Non-relational database structures
    • Application caching policies (Redis, Memcached)
  • Tangible Technology Assets:
    • Raw static assets (text, images, media files, video streams)
    • Databases (MySQL, PostgreSQL, MongoDB, Cassandra)
    • Cache engines (Redis, Memcached)

2. Client-Server Architecture

Depending on where the presentation layer, business logic, and data store reside, system architectures are classified into different tiers:

2.1 Tiered Architectures

  • 1-Tier Architecture (Single-Tier): All required application layers—presentation, business logic, and database—reside on a single physical machine.
    • Example: A desktop application (like a calculator or MS Word) running locally.
  • 2-Tier Architecture: Traditional client-server architecture where the user interface (presentation) is handled on the client side, while data sets are managed and stored directly on a central database server.
  • 3-Tier Architecture: The application is partitioned into three distinct logical layers:
    • Presentation Layer: The user interface (browser, mobile app).
    • Application Layer: The server containing core business rules and business logic.
    • Database Layer: The system storing database rows or documents.

2.2 Types of Clients

  • Thin Client: The client machine performs minimal local processing. It acts primarily as a view layer, fetching ready-to-render data from external servers.
    • Examples: Modern web apps, streaming dashboards, e-commerce landing pages.
  • Thick Client (Rich Client): The client performs major computational tasks locally before sending data to the server.
    • Examples: Modern online multiplayer games, desktop video editors, 3D rendering systems.

3. Monoliths vs. Microservices

When structuring application boundaries, software architects face a fundamental choice between a unified monolith and distributed microservices.

[!TIP] For a deep dive into real-world architecture shifts, review Atlassian’s Microservices vs. Monoliths Analysis and Prime Video’s architectural shift Reducing Costs by 90% via Monolithic Architecture Refactoring .

3.1 Monolithic Architecture

A monolithic application is built and packaged as a single, unified codebase and execution unit.

  • Pros:
    • Simplified Development: When code is centralized in one repository, setup and coding are extremely straightforward.
    • Frictionless Deployment: One binary or package makes deployment to servers simple.
    • Easier Debugging: Execution runs in a single process, making request tracing and breakpoint debugging fast.
  • Cons:
    • Scalability Bottlenecks: You must scale the entire application; you cannot scale individual high-traffic modules independently.
    • Deployment Bottlenecks: Any minor bug fix requires redeploying the entire monolithic cluster.
    • Single Point of Failure: An unhandled error in a secondary module can take down the entire application.

3.2 Microservices Architecture

A microservices architecture splits a system into a collection of small, isolated, independently deployable services communicating over lightweight protocols.

  • Pros:
    • High Reliability: Faults inside one microservice do not immediately impact other independent services.
    • Continuous Deployment: Teams can release updates to their microservice independently.
    • Flexible Scaling: Highly targeted scaling of CPU/memory resources for specific, critical services.
  • Cons:
    • Exponential Complexity & Costs: Massive operational overhead, distributed transaction management, network lag, and complex infrastructure orchestration costs.

4. Remote Procedure Calls & gRPC

Modern microservices rely on rapid communication techniques. A Remote Procedure Call (RPC) allows one service to call a function on another service as if it were a local function call.

  • Local Procedure Call: The execution of a subroutine within a single process on the same machine.
  • Remote Procedure Call: The invocation of a subroutine hosted on an external machine over a network.
  • gRPC: An open-source, high-performance RPC framework developed by Google in 2016. gRPC is widely adopted by Netflix, Cisco, and others for lightning-fast internal microservice orchestration.
    • HTTP/2 Protocol: Uses multiplexing, header compression, and binary serialization to achieve high performance.
    • Protocol Buffers: Uses a highly efficient binary serialization format instead of human-readable JSON payloads.
    • Cross-Language Support: Code generation tools create client/server stubs in Python, Go, Java, C++, and more.

5. Foundational Network Protocols

A network protocol is a standardized set of rules defining how data is transmitted and received between different hardware nodes across a network.

  • Protocol Independence: Protocols guarantee that devices can exchange payloads regardless of their internal operating system, chipset, or programming environment.
  • Common Protocols:
    • TCP (Transmission Control Protocol): Connection-oriented with guaranteed delivery and packet ordering.
    • UDP (User Datagram Protocol): Connectionless, ultra-fast streaming without delivery guarantees.
    • HTTP/HTTPS (Hypertext Transfer Protocol Secure): Secure application layer protocols for standard web documents.
    • TLS/SSL (Transport Layer Security): Cryptographic layers securing socket traffic.

[!NOTE] To dive deeper into the low-level mechanics of computer networks, read our complete guide on Foundational Network Protocols .

6. Proxies: Forward & Reverse

Proxies sit between clients and backend servers to manage traffic, block unauthorized requests, and cache assets:

  • Forward Proxy: Acts on behalf of the client (usually behind a firewall) to hide the client’s identity or restrict outgoing content.
  • Reverse Proxy: Acts on behalf of the backend servers to balance incoming traffic, terminate SSL, and cache dynamic responses.

[!NOTE] Read our specialized article on Forward and Reverse Proxies to explore real-world implementation rules with Nginx and HAProxy.


7. Further Reading