System Design Concepts

Developing a solid grasp of basic design principles is necessary to build a scalable and reliable system. This blog post explores some key terms related to system design that you’ll come across regularly.

Server

A server is a powerful computer that’s always on and connected to a network.

What does a server do?

  1. It stores information like website files, databases, files, emails, applications, etc.
  2. When you ask for some information, the server finds it and returns it to you.
  3. The server is always available and accessible from anywhere to take requests from the client(s).

Single Server

Imagine a one-person store. The owner handles everything — taking orders, stocking shelves, and managing the cash register. This is similar to a single-server system. It’s a single computer responsible for all tasks, like storing data and running applications.

Multi-Server

Now imagine a larger store with dedicated departments. One section handles sales, another manages inventory, and a third deals with finances. This is like a multi-server system. Multiple computers work together, each handling specific tasks for better efficiency.

Load Balancer

As the name suggests, it distributes the load across servers. It is used in multi-server architectures. It directs the incoming traffic to different backend servers to serve the request by the client and give the information that is asked. The benefits of load balancers are that they provide high scalability, high availability, and optimized performance.

Databases

A database is a place where all the data is stored in an organized format so that it can be easily retrieved whenever needed.

There are different types of Databases:

Relational Databases

Data is organized in tables with rows (records) and columns (attributes). Each table adheres to a predefined schema, enforcing data integrity and consistency. Tables can be linked through foreign keys, allowing for complex data relationships and efficient retrieval of interconnected information.

NoSQL Databases

NoSQL databases are generally used to store unstructured or semi-structured data. It offers more flexibility in data storage models. They can handle data in various formats, including JSON documents, key-value pairs, or graph structures. It also scales well.

Content Delivery Network (CDN)

A CDN acts like a cache server for static content like images, videos, HTML, CSS, JavaScript, etc. for your website, which is geographically distributed and kept closer to the users.

When a user requests your website, the CDN checks its cache. If the content is available, it’s delivered directly from the nearest CDN server, significantly improving loading speed and reducing the load on the main server.

Caching

  • Stores Frequently Used Items: A cache, like your assistant, remembers things you use often (frequently accessed data). It stores a copy of that information close at hand.
  • Faster Retrieval: When you need that information again (another user requests the same data), your assistant (the cache) can quickly provide it from their memory (the cache storage) instead of making you (the server) search for it again. This saves time and effort.
  • Reduced Load: By handling frequently accessed data, the cache takes some pressure off your brain (server), allowing it to focus on more complex tasks or new information retrieval.

Popular tools used for caching are Redis, Memcached, and many more.

Scaling

Imagine you run a website, and traffic is booming! To handle the increased demand, you have two main options for scaling your resources: horizontal scaling and vertical scaling.

1. Horizontal Scaling (Scale Out)

Increases system capacity by adding additional nodes (servers or virtual machines). These nodes work together to distribute the workload.

2. Vertical Scaling (Scale Up)

Increases the capacity of a single server by adding more resources (CPU, memory, and storage).

Conclusion

These are a few of the terminologies popularly used in system design and should be considered while designing large-scale systems.

Author: Jainish Sakhidas

Back to blog