System Design Overview

This document introduces the essential concepts and building blocks of system design, including client-server architecture, DNS, proxies, HTTP/HTTPS, APIs databases, and scaling strategies for modern applications.

This document provides a practical overview of system design fundamentals, covering client-server architecture, DNS, proxies, HTTP/HTTPS, APIs, database choices, and scaling strategies. It explains how these concepts are used to build and scale real-world systems and prepare for system design interviews.


1. Core Concepts of System Design

System design is the foundation for building scalable, reliable, and maintainable software systems. Mastering its core concepts is essential for advancing from junior developer to senior engineer or preparing for technical interviews at top tech companies.


2. Client-Server Architecture

Most web applications use the client-server model. The client (such as a browser or mobile app) sends requests to a server, which processes them and returns responses. Servers are always running, waiting to handle incoming requests for data storage, retrieval, or modification.


3. Addressing and DNS

Clients need to know where to find servers. On the internet, this is done using IP addresses, which act like phone numbers for computers. Since humans prefer easy-to-remember names, the Domain Name System (DNS) maps domain names to IP addresses. When a domain is entered in a browser, the computer queries a DNS server to get the correct IP address.


4. Proxies and Reverse Proxies

Requests from clients may pass through proxies or reverse proxies. A proxy acts as a middleman, forwarding requests and responses while hiding the client’s IP address. A reverse proxy sits in front of backend servers, routing client requests to the appropriate server based on rules, improving security and scalability.


5. Latency and Global Distribution

Physical distance between clients and servers causes latency. To reduce latency, services are deployed in multiple data centers worldwide, allowing users to connect to the nearest server. This improves responsiveness and user experience.


6. HTTP, HTTPS, and Security

Clients and servers communicate using HTTP or its secure version, HTTPS. HTTP requests include headers and sometimes a body. HTTPS encrypts data using SSL/TLS, protecting it from interception or tampering.


7. APIs: REST and GraphQL

APIs allow clients to interact with servers without dealing with low-level details. REST APIs use standard HTTP methods and are stateless, treating everything as a resource. GraphQL lets clients request exactly the data they need in a single query, improving efficiency but requiring more server-side processing.

API StyleKey Features
RESTStateless, resource-based, uses HTTP methods (GET, POST, PUT, DELETE), simple and scalable
GraphQLFlexible queries, fetch only needed data, single endpoint, more server processing

8. Databases: SQL vs NoSQL

Databases store and manage application data. SQL databases use tables and schemas, providing strong consistency and ACID properties—ideal for structured data and relationships. NoSQL databases offer flexible schemas and high scalability, using models like key-value, document, graph, or wide-column stores. Many modern systems use both types together.

Database TypeCharacteristicsUse Cases
SQLStructured schema, ACID, strong consistencyBanking, transactional systems
NoSQLFlexible schema, high scalability, eventual consistencyBig data, distributed apps

9. Scaling Strategies

As user demand grows, systems must scale. Vertical scaling (scaling up) adds resources to a single server but has limits and higher costs. Horizontal scaling (scaling out) adds more servers, increasing capacity and reliability. If one server fails, others can take over.


10. Load Balancing

A load balancer distributes incoming requests across multiple servers, improving reliability and performance. It uses algorithms like round-robin, least connections, or IP hashing to decide which server handles each request.


11. Database Scaling and Indexing

Databases can be scaled vertically or horizontally. Indexing speeds up read queries by creating efficient lookup tables, similar to a book’s index. Indexes are created on frequently queried columns, such as primary keys, to quickly locate data without scanning entire tables.


12. Conclusion

System design is about understanding and applying core concepts to build robust, scalable, and efficient systems. Mastery of these fundamentals is essential for both real-world engineering and technical interviews.


13. FAQ


References