→ first we need to understand the problem statement.

→ break it down into components(essential)

<aside> 👉🏽

we will use the example of designing system for Facebook, suppose we have component and features as, post , feed, notification, auth

</aside>

→ dissect each component,

for each sub-component we are going to take care of these points and we will repeat for every sub-component when it’s needed.

  1. Database and caching.
  2. Scaling and Faul tolerance.
  3. Async processing(Delegation).
  4. communication

Add more sub-components if needed

<aside> 👉🏽

imagine we are making component for Feeds, know when we deep dive in feeds . it will have some requirements like

webserver ← → database

generator → database

aggregator→ database

now the thing is aggregator here can be a choice if we don’t want to aggregate/filter/sort or stuff with our data then it’s not necessary. so we shouldn’t be doing it just for the sake of system design

</aside>


How do we know if we have designed a good system

  1. while designing we broke everything needed in a component and then it into subcomponents.
  2. every single component is exclusively performing a duty that no other is doing again .
  3. each component should be scaleable in itself.
  4. each component if fails have a recovery plan.
  5. even if one of the parallel component goes out, then it should not be covered in single point failure