InterviewNoodle
Published in

InterviewNoodle

System Design Architecture — II

Hi all, Welcome back to the blog on System Design Architecture. If you have missed the previous one, please free feel to checkout on the first part here👉https://aarthikannan2103.medium.com/system-design-architecture-i-5ee4f2c48c6e

Now let’s continue on to our topic. Our Bakery business is now going so well. Your employee is working 8 hours a day along with a backup employee.

You now have an idea to expand your business by providing online delivery within a certain perimeter range. Now orders are gearing up. You need more human power. You cannot scale your main employee anymore since he is already working for 8 hours. Now the option left out is to hire more employees. More the people, the faster the process will be, and the more the ability to handle the incoming requests. This in a system design term known as Horizontal scaling. The ability to handle more requests by setting up many servers is known to be horizontal scaling.

More bakers , more the capacity to handle requests. Horizontal scaling.

Now you got people from different expertise to work on your Bakery. You hired say 10 people out of which 3 are specialized in making donuts. 5 are expertise in baking cake, and the other 2 are is making breads and muffins. You got it all figured out. Now you receive an order for one cake and 5 donuts.

How will you split the work?

Well the one way is to just pick a random person for a cake and donuts.

You know the results already. It won’t work that way.

We have our own expertise in each fields and why not to use them? Lets split up the order and give it to that expertised person. In this way you, employees and customers all are happy. What we are doing here? we are assigning a specific defined task to each employee and they perform their work independently. This is nothing but a Microservices in System design. Microservice is the system design architecture where each function of the application operates as an independent service.This architecture allows for each service to scale or update without disrupting other services in the application.

At this point, Our Bakery is doing so well. It delivers order at time and we also have our specialised experts. It’s also scalable. But what if electricity went out at the area the Bakery is in? Or License for that place expired? You wont be having a job for that entire day 😒. It’s not good. You have to pay for your employees. Rent for the building. So we have to keep this Bakery running. What can we do here?

Here the solution is, we have to distribute our Bakery. We can’t keep all the eggs in a single basket. Here we can have a seperate shop not on the same zone, but in a different zone. We can move or hire less employees over there. So if something like this happens, we will still have our Business running.

Oh yeah, this is the biggest step. we will be having two seperate shops now in different area. So in case of any failure over here we can always rely on the other. Complexity increases. There needs to be communication between these two Bakery. We have to re-route the order request between these two shops. We also have to decide which order goes to which Bakery. So here we also get an advantage. We can route the order based on the address. If the order request address is near by to the shop-2 we can route the order to shop-2. If it is near by to shop-1 we can route to it shop-1. Delivery time decreases rapidly. So customer satisfaction increases. This is the concept of Distributed Systems in System Design. A distributed system is a computing environment in which various components are spread across multiple computers (or other computing devices) on a network. These devices split up the work, coordinating their efforts to complete the job more efficiently than if a single device had been responsible for the task.

Isn’t just awesome to think about this? Be curious till our next blog😁.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store