Beginner Friendly Introduction To System Design 🚀

Jaspreet Singh Sodhi
3 min readJun 18, 2024

--

What is System Design ?

System Design is a process of defining architecture, modules, interfaces, components & data for a system to satisfy its requirement. It involves both high & low level design.

So before diving deep into every concept of system design let’s take a real world example of a Social media Application & try to understand all those complex terminologies you came across while learning system design one by one !

1. Vertical Scaling -

Let’s suppose Initially, the application runs on a single server with:

  • CPU: 8 cores , RAM: 32 GB , Storage: 1 TB

As user requests, database queries, and image processing increase, the server struggles and may shut down. To handle the load, the engineering team upgrades the server to:

  • CPU: 32 cores , RAM: 128 GB, Storage: 2 TB

Vertical scaling means adding more power (CPU, RAM) to your existing machine. Although This has some limitations, which we’ll discuss later in the series.

2. Preprocessing using Cron Jobs -

As you know, social media applications handles millions of images uploaded by users daily. To optimize storage and improve user experience, the platform needs to preprocess these images (e.g., resizing, compressing) efficiently. Instead of doing this processing immediately upon upload, which can slow down the user experience, Instagram uses Cron jobs ( i.e, set of some tasks which occurs every time after a defined interval)

3. Backup Servers -

Backup servers are used to store copies of your data. In case the main server fails, the backup server can take over to prevent data loss. For our example, this could mean keeping a copy of all user photos and data on a separate server.

4. Horizontal Scaling -

Horizontal scaling means adding more machines to your pool of resources. For instance, if one server can’t handle all the users on your app, you add more servers.

5. Microservices -

Microservices are a way to structure your application as a collection of loosely coupled services. For our case, different microservices might handle user authentication, photo uploads, comments, notifications etc.

6. Distributed Systems -

A distributed system is a system whose components are located on different networked computers. For our app, user data might be distributed across multiple databases to improve access speed and reliability.

7. Load Balancing -

Load balancing distributes incoming network traffic across multiple servers. This ensures that no single server becomes overwhelmed. In our case, a load balancer would distribute user requests to different servers ensuring good user experience & perfect working of the whole system.

8. Decoupling -

Decoupling means separating components so they can operate independently. In our app, this could mean separating the frontend (what users see) from the backend (server-side operations).

9. Logging & Metrics -

Logging records events that happen in your system. Metrics calculation involves analyzing these logs to monitor performance, errors, and usage patterns. In our case, logs might track photo uploads, and metrics might show peak usage times of a particular user.

10. Extensibility -

Extensibility is the ability to add new features without disrupting existing ones. Our social media app should be designed so that new features like video uploads can be added easily.

11. High level Design vs Low Level Design

In Simple words, High level design means architecting your system before deep diving into building the actual stuff , i.e defining- Components, API layers, Services etc.

whereas , Low level design means actually working on the business logic discussed by the team by following the architecture created earlier to have a efficient & scalable system !

That’s it! You’ve covered the basic terminologies needed to dive into building great systems. Feel free to follow me and share your thoughts on what else I can improve.

See you in the next part! 😊

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jaspreet Singh Sodhi
Jaspreet Singh Sodhi

Written by Jaspreet Singh Sodhi

Full Stack Software Engineer | Curating Top-Notch Content @jaspreet.dev on Instagram ✨

No responses yet

Write a response