1.Intro
This is a shot blog on most common system design components you will hear. You will be learning Load-balancers, Caching and Monolithic & Microservice Architectecture
2.Components
I introduce you to 10 most common terms you will hear if you are learning System Architecture. Below are some of the most important concepts you need to know if you getting into System Architecture.👇
- 1.Load Balancer
A single server can't handle millions of requests at a time. So, What's the solution? Add more servers but how do we route the users to them?🤔. Here a load balancer distributes the load among the available servers. Nginx/HaProxy are some popular load balancers.
- 2.Caching
Caching Layer is between the API and the database. When a request to retrieve a piece of data is sent the API checks the cache and if it's available it returns it to the user or else queries the database. Using a caching layer increases the speed of the read operation.
- 3.Monolithic
It is one large codebase with all the functions of your API tightly linked together. If a part of your system breaks your whole API will be down📉. Most project starts with a monolithic approach and then moves on to microservice architecture depending on their team size.
- 4.Microservice
Independent and contained services with each service having an individual database. For ex: if the timeline service fails it does not affect the tweet service or any other service. There will be a load balancer that routes the request to desired services. Microservice architecture introduces complexity in deploying and increases network latency. Each service can talk to each other using a Message Queue like kafka.
- 5.Scaling
Large enterprises have huge amounts of data. with the increasing amount of data each day their server should grow accordingly.
There are two types of scaling horizontal & vertical scaling
- Vertical Scaling - It means upgrading the current system.upgrading RAM, CPU’s and hard disk drives but there is always a certain limit on how much we can upgrade.
- Horizontal Scaling - It means to add multiple systems to improve the performance of the service. A load balancer is needed to distribute the load to multiple systems.
Conclusion
This was a fairly a short blog, hope you have learned something new in this. next time I am going to be building Twitter back-end clone🔥.
Top comments (0)