“System Design has become important part of Technical Interview for any software engineering jobs”
In this post, I’ll try to summarize a few things that helped me learn and face system design interview. To build anything in this world you need skill along with the right tools. I’ll try my best to provide you with a list of tools that are must for an individual to master system design. Once you have all the tools in place and you know how and where to use it then it’s just a matter of time for an individual to be skilled.
I’ll try my best with all the knowledge I have gained from my research along with my work to present you with a consolidated to-do list that will help you learn and be successful in your next system design interview. To start it’s important to know the tools of the trade before even thinking to design your first system. These tools will help an individual to understand and make sense out of design referred.
Remember, the only way to excel in system design interview is to prepare well ahead of time, system design interview demands a lot of prep.
The Tools of the Trade for System Design
CAP Theorem (Consistency, Availability, and Partition)
This theorem holds true for every distributed system designed and developed. As per CAP theorem, only 2 out of 3 (Consistency, Availability, and Partition) can be achieved simultaneously for a distributed system. One must understand this theorem in order to decide between consistency, availability, and partition. This theorem will also help you choose out of the various flavor of databases available for your design.
Microservices
https://microservices.io/patterns/index.html — This is by far the most informative website to refer and understand basics of micro-services and how it’s implemented. Highly recommend reading each article published from the Patterns section of the website, this should not take more than a week.
Distributed systems
Distributed systems are the system that forms the backbone of today’s scalable and efficient system. Best way to learn more about the distributed system is to read about it and design a small system as your side project or college project. Make sure you even implement the system you designed based on all the knowledge, this will help you understand the implementation difficulties of a system. Once you implement your own designed system you get to know how well you have designed things. I would suggest if you are in college make sure you choose subjects that cover distributed systems in detail. Personally, I tried to design as many systems as I can as part of my job and college project. Designing and developing system has given me more knowledge and information than just reading and making notes.
Load Balancing
The most important part of a distributed system is Load Balancers, good understanding about LB will help you design highly scalable systems. I feel it’s important to know the different algorithms that work behind a load balancer, make sure you read about it and try to understand as much you can.
Read about LB @ https://lethain.com/introduction-to-architecting-systems-for-scale/
Caching
Caching and load balancer both together make your system scalable and efficient. A load balancer will help system scale horizontally while caching will help better utilize the resources on the system. Having strong understanding of caching and its implementation sets you aside from other candidates. Once you are aware of caching next you need to know where caching can be used. Not going in details but we can use cache at the application as well as database-level depending on the system requirement. Having knowledge about the latest caching technologies helps, make sure you read about Redis and Mem-cache. AWS provides service for caching it would good if you can use those services in any of the application you build so that an individual is clear when to use Redis and when to use Mem-cache.
Read about AWS caching solution @ https://aws.amazon.com/caching/aws-caching/
Partitioning
Partitioning is one thing that provides a mechanism to distribute data over a number of machines. Most importantly partitioning breaks big database into much smaller parts that can be stored on different machines. Knowing about the partitioning mechanism will definitely help in designing a system that is more distributed and available.
Read about Partitioning @
https://medium.com/@Pranaykc/understanding-partitioning-in-distributed-systems-4ac3c8010fae
https://berb.github.io/diploma-thesis/original/062_internals.html
Proxies and Reverse Proxies
A proxy can be anything software/hardware between client and backend servers. An important concept to know would be how reverse proxies work. (I was asked about reverse proxy and how does it work in an interview)
Read about Proxy @
https://www.jscape.com/blog/bid/87783/forward-proxy-vs-reverse-proxy
https://www.nginx.com/resources/glossary/reverse-proxy-server/
SQL vs NoSQL
Knowing the difference between SQL and NoSQL database will certainly help in designing the backend system.
Read about SQL vs NoSQL @
https://www.thegeekstuff.com/2014/01/sql-vs-nosql-db
Consistent Hashing Mechanism
Messaging Framework
Kafka
RabbitMq
JMS
Difference between JMS and MQ’s
Basic understanding of MongoDB, MySQL, and Cassandra
Case Studies:
YouTube
Netflix
eBay
Along with the above concept, I think it’s good to have a basic understanding of Networking and Operating System.
To conclude, System Design is your opportunity to showcase your knowledge, one good thing about system design is that it’s never right or wrong. Be confident and keep learning.
Reference Material
Reading
https://www.hiredintech.com/system-design/the-system-design-process/
https://www.usenix.org/legacy/event/osdi10/tech/full_papers/Beaver.pdf