Getting Started With System Design

Getting Started With System Design
Getting Started With System Design

Introduction

Designing scalable systems nowadays is one of the common challenges that Senior Developers face in their careers. It is tough to get opportunities to work on large projects, especially from the ground up. Usually, software engineers get to work on small fragments of a more extensive system. Due to which they lack the adequate knowledge required to design large systems.

Tech giants like FAANG majorly focus on system designs. And if you, too, have a dream to get a job in such tech companies and want to flex on your LinkedIn profile, then cheers! This blog is for you. 

Image source: Giphy

System Design in software engineering is usually defined as a process of determining the architecture, product design, modules, interfaces, and data for a system to satisfy specified requirements. It is the process of defining, developing, and designing systems that satisfies the specific needs and requirements of a business or organization.

Where to start from?

Most of us are familiar with what to do, but we still can’t figure out where to start. It is essential to clear up the fundamental concepts. Knowing all the concepts helps you in making the right decisions while designing a system.

Starting with Fundamentals

Fundamentals of System Design basics include:

  • Scalability: While Designing a system, Scalability is a vital characteristic of any system. It simply means data rate and traffic(load) are going to be increased while scaling. Let’s say your system is serving 500 users right now, and you are planning to scale operations and onboarding, new users, at a 2x rate. Then, Scalability is essential, and the number of resources will be required to fulfill demand. The performance and management of the system and complexity shouldn’t be affected while scaling.
  • Throughput: Throughput is defined as the amount of work done by a machine in a particular time. Throughput is one of the significant metrics for network performance. Generally, we measure the throughput of the server by how many API calls it serves in unit time. Generally, throughput is measured in Gbps, Mbps, Kbps. 
Throughput = (Amount of Work)/Time taken.
  • Response Time: Time taken by any API in response to an API Call is the response time. Let’s say we sent a request to API at t1, and got a response at t2. The time difference which we get between sending the request to t1 and the response getting from t2 will be the response time. Example: When we say our system serves 100 requests per second, response time is 1 sec for 100 requests.
  • Latency: Latency is an essential measure of the performance of the system. It is defined as how long a system takes to transmit data from one point to another point in the system.
  • Availability: With throughput and latency, availability also plays a very crucial role. It simply means how Fault-tolerant a system is. If any failure occurs, then how will the system work? That is how resistant a system is in adverse conditions and how it repairs itself whenever needed.
  • Concurrency: The art of writing concurrent programs for the system is concurrency. Concurrency means accessing the same resource simultaneously, and if it’s mutable, then the data race starts and can lead to inconsistency.

We have listed a Guided Path for System Design on CodeStudio. It has been curated by industry experts to give you both theoretical and practical knowledge. It will be a good starting point if you are just getting started with the subject or preparing for your next big interview!

After going through all the fundamental concepts, you can step onto the designing part. You can start with use cases like Ola, Zomato, Twitter and try to design all the components. Think majorly about making your system as Fault-tolerant as the system will be running at all times and Scalability to handle a growing amount of traffic.

Spend a good amount of time thinking about resolving bottlenecks. This process will help you to apply the concepts you have learned in designing a system.

System Design Courses

There are relatively very few courses that specialize in System Design. System Design is a tricky topic for making a good course because great System Design requires more practice than watching videos. But still, I have found some courses for you which can help you in developing your skills.

blog banner 1
  1. System Design Course By Coding NinjasIf you are a complete beginner and want to develop your skills in System Design, then this course is for you. This course will deepen how the applications you use daily are actually implemented and get trained for your interviews in the process. The course covers all of the following :
  • Introduction – It covers all low-level and high-level design patterns along with the product cycles.
  • Architectural Patterns – It will help you understand when to choose which pattern along with the advantages and disadvantages.
  • Application Characteristics
  • Database
  • Communication
  • Web Applications – Rest APIs, client-server model.
  • Servers and securities.
  1. System Design Interview: An Insider’s Guide online CourseThis course explains the concepts with well-structured well-structured diagrams. This course is the same as the book and put together by former senior engineer Alex Xu at Twitter, Zynga, and Microsoft. This course covers the most ground of all courses.
  1. The Complete Design Interview Course By Abhijeet Desai (Udemy)This course provides specific steps to follow while designing a system. This course deals with all the concepts and components used in System Design. The concepts were explained with the case studies of real-world systems, which are mostly asked in the System Design Interviews.

System Design Books

There are many online courses you can find on the internet, but books are the most refined source of knowledge. The author of the book puts his experience in learning from his life and presents it in front of us in a small package. Following are the best books, along with the links you can find by renowned authors.

  1. System Analysis and Design by Dennis, Wixom, and Roth
System_Analysis_and_Design
  Systems Analysis and Design by Dennis, Wixom, and Roth

This book deals with the concepts and approaches with the projects that mimic real-world scenarios. You will get to learn about the in-depth core System Design concepts with case studies and examples.

This book will help you in developing essential skills and knowledge required for System Design. The authors made this book comfortable for all beginners and professionals.

  1. Clean Architecture by Robert C. Martin
Clean_Architecture
Clean Architecture by Robert C. Martin

This book deals with the concepts of Software structure and DesignDesign and focuses on the different real-world challenges faced by the developers while designing a system.

This book will let you know the difference between good code and bad code and includes unit tests and practice test-driven development. 

  1. System Design Interview by Alex Xu

Most of the developers found themselves stuck in the interview and could not crack the interviews. Despite doing a lot of research and study on System Designs, it is difficult to crack such interviews without knowing what is being asked in the interviews. So, this would be the best book if you are preparing for System Design Interviews.

This book contains plenty of diagrams and illustrations that resemble real-life interviews and help you visualize the actual system. This book will help youtube know what the interviewers expect from candidates when they throw such System Design questions.

You can go through this video for a better understanding.

Interview Questions

I know you are very much eager to jump into this section.

Image source: 9GAG

Before discussing the interview questions, there are a few things that should be kept in mind. There should be a well-planned manner to approach the System Design problem. There is no fixed solution or approach to solving such problems.

The problem may look vast initially. So, it should be broken down into components. The following approaches can help you out in solving System Design Problems.

Approach for a Problem:

  • Breaking down the problem into components. These components can be features of the system you need to implement. Ask the features from the interviewer and start planning those features into your system.
  • Communicate well with the interviewer with your ideas. Try to analyze your DesignDesign clearly on paper with flowcharts and diagrams. Make the communication interactive by telling the interviewer how you have planned to tackle the problem of Scalability and will be designing your database and many others.
  • Discuss some reasonable exceptions while designing the system. For example, assume the number of requests the system will be processing per day, the number of database calls made in a month, or the efficiency rate of your Caching System. These are some of the numbers you need to assume while designing.

Now, let’s move onto some important Interview Questions.

  1. How would you design a URL Shortening Service (TinyURL System)?

URL shortening service is a service that takes a long URL input and converts it into a short, compressed, unique URL, for Example, TinyURL.

We can consider the following things while designing this service. 

  • API – Discuss how clients will navigate with the front-end services.
  • Application Layer – Discuss how the worker thread or hosts that take the long URL generate the tiny URL and store both of the URLs in the database.
  • Bottom Layer– Database.

          You can go through this video lecture for a better understanding.

  1. How would you design the Twitter App?

This question is a very famous and favorite question of the interviewers. Most of the candidates directly jump into heavy technical terms like MongoDB, Bootstrap, MapReduce, etc. The interviewer does not directly want to know about the tools you will use but wants to know the high-level ideas about you solving the problem. First, we should focus on the high design model then move to the low-level design.

  • First, discuss the core ideas like how the user will tweet within a short period, how the user will see the tweets, how the home timeline will be visible, etc.
  • Then, start discussing the data modeling, like what type of database you would use, a relational or non-relational database, and why.
  • Then start discussing how the consistency and management of the huge traffic the model will face.

You can go through this video for a better understanding.

Frequently Asked Questions

Is System Design Easy?

Usually, System Design takes 2 to 3 months for preparation if you are a complete beginner. It is neither easy nor very hard. It all depends on the time and focus you devote while practicing System Design.

How do I prepare for System Design Rounds?

Always start with the basics of System Design. Then start looking for the questions asked in previous company interviews. Self-assess yourself on those questions and start building your own DesignDesign.

What are some examples of System Design?

System design in itself is a vast concept. It can be as easy as designing “Annotation Tools” and as hard as designing a full “Instagram” app. System Design can also be used in designing security systems.

Key Takeaways

After going through the above article, you can now start learning and designing your system. You can apply to tech giants like FAANG for SDE2, Technical Lead, Project Manager, and Design-related profiles after learning the concepts.

If you want to get assessed on your Design and want hands-on experience in System Design, you can enroll in our courses on System Design. Our mentors will help you in developing the skills. You can check out our Guided Path for System Design Interviews.

Until then, All the best for your future endeavors, and Keep Coding.