Skip to main content

Basics of System Design


This article is first one from the series of articles dedicated to system design interviews. Here i am going to present the base scenario to consider before starting to solve system design problems.

Questions to ask?

1) what is the number of requests a website will recieve in a day/month/second?
2) what is the amount of memory a website will deal in a day/month/second?
3) what is the number of servers that can accomodate these requests?

To answer this , first we need to remember the below numbers:-

  • 1 million = 10 lakh = 1000000 = 10^6
  • 1 billion = 1000 million = 10^9

  • 1 KB = 1024 B = 10^3
  • 1 MB= 10^6 = 1024 KB
  • 1 GB= 10^9 = 1024 MB
  • 1 TB = 10^12 = 1024 GB

  1. Memory we need to see in Bytes
  2. Requests we need to see in numbers

example :-

suppose a website recieves 100M requests every month then:-

requests per day = request per month /24 = 416700 requests
requests per second = requests per day / (24*3600) = 4.8 requests per second

memory:-

if we take 20:80 principal where 20 percent is write and 80 percent is read operation. From above example it will be like 100 M requests for write then 400 M is read request.

For each second we are writing 4.8 requests if we consider data to write is 500kb then total data writing of 2400 kb or 2.4 Mb data per second.

For each second we are also reading around 9.6 MB of data. So bandwidth is approximately 12 Mb second.

Storage:-

if we consider for 5 years and 2.4MB of data is written at every second then :-

2.4 MB per second = 207360 MB per day = 207 GB per day= 4.9 TB per month = 59 TB per year = 295 TB for 5 year.

We will go through in detail about 500 kb data that we are writing in next chapters.

So it will be around 295 TB of data. If we consider one machine :-
with win 32 w/NTFS we can store 2TB data ,so total 147 machine we need to store all this data.
With solaris 9/10 we need only 18 machines /( 18 TB in each machine)

we can divide these machines into cache data and db data based upon requirement.

User storage and cache storage is coming up in next tutorial.

https://tech.nazarmubeenworks.com/2019/08/calculating-size-of-user-and-cache.html



Comments

.

Popular posts from this blog

Career in software engineering : Roles to know

when someone starts a career in software engineering there are plenty of options. Although most graduates have the same degree, everyone starts in a different role. Developer / Coder - Engineers in this role get a chance to actually implement and write software. At the start of a career mostly it is about fixing defects in existing software then taking small changes to the software and eventually getting to the point to handle and implement more complex changes.  Quality analysts / Quality engineers - Engineers in this role test and automate software. This is a challenging role where one has to know about the full functionality of the software and test accurately so the software built is of high quality. This role also involves the automation of test cases and preparing a test suite that can be run and detect issues automatically. Release Engineers - Once the software is built and tested release engineers are responsible for pushing a set of code to production. A production is a plac

5 books that your college doesn’t tell to read seriously for PLACEMENTS

1.               Let us C - It can be the best book to pick in your first semester itself. The book is written in a very simple style so you can easily grasp most of the concepts of programming by just working hard on it. It will help you in building basics of programming around c language. 2.               HEAD FIRST JAVA- This book you should buy in third semester and invest your whole second year into it by working on all the codes. This book will help you teaching the concepts in a very attractive way. You will never bore while working  through this book. 3.               Data Structure Made Easy In Java - As soon you finished studying core java in the 4 th semester just pick this book to understand the logic’s of data structure and algorithms. It will help you to go deep inside this subject from which questions are frequently asked in all the interviews. This book carries a great set of problems that will help in developing intellectual knowledge around