Back-of-the-envelope calculations

Photo by Med Badr Chemmaoui on Unsplash

Back-of-the-envelope calculations are estimates you create using a combination of thought experiments and common performance numbers to a get a good feel for which designs will meet your requirements. © Jeff Dean, Google Senior Fellow.

How would you decide what is the best design for a given problem?

How much disk space is required to store the data? How many servers are needed to be able to fulfill all the concurrent requests at peak traffic?

Two of the same systems with 1000 and 1 million users would have different needs and different designs. You can do back-of-the-envelope calculations to determine how a system should be designed.

Most often, we need to do traffic estimates, storage and memory estimates, bandwidth estimates, and latency estimates. The most critical resources help you to make the choice of architecture.

In an actual interview, you would get just a few minutes to come up with your estimates and prove that your design fulfills the goal of the required system. These 3 concepts will help you: power of two, latency numbers, and availability numbers.

Photo by Joshua Hoehne on Unsplash

You can practice by estimating how many daily users have a system if there are 200 million monthly active users. If all of them post once a day a short message and we keep these posts for a year, how much storage space do we need?

--

--

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
KatiaG

KatiaG

18 Followers

Software Developer, +12 years coding. Bachelors in CompSci.