The main focus in this round is to see your thought process and whether you'll be able to design a minimal system keeping future scale in mind and by following the standard principles.
How should one approach System Design questions during an interview?
Here's the step by step guide:
🧵👇🏻
The main focus in this round is to see your thought process and whether you'll be able to design a minimal system keeping future scale in mind and by following the standard principles.
You cannot possibly design a complex system in 1-2 hours which engineers usually take months to years to design, develop and build.
So this is how you should approach this round:
Example: "Design an application like Twitter"
- Post tweet
- Home timeline
- Profile timeline
- Analytics
- Likes
- Retweets
- Following
- Bookmark
- Trending etc
You get the idea!
Ask a lot of specific questions in this step and make sure both of you are on the same page.
- consistency
- availability
- durability
- scalability etc
In this step you can assume the traffic your service gets and estimate how much data you need to store in your tables so that your system works for the next 5 - 10 years without running into any problems.
- Read / Write ratio (ex: Twitter)
- Each file size (ex: Dropbox)
- Average photo size (ex: Instagram)
- Total active users (Ex: Facebook) etc
Based on the assumptions, you can calculate how much data you need to store in your tables.
Ex: In case of Twitter:
- Clients
- Timeline Svc
- Search Svc
- DB Storage
- Cache
etc
Come up with different tables, their schema and relations between them to store the data for your application.
Based on the columns and the data type of each of the column you can compute how much data you may need to store for the next 5-10 years.
For example if your data schema constantly changes and scalability is a requirement, you can go with a NoSQL db.
If transactions are important then go with SQL.
For example:
- in case of URL Shortener service they may ask you how you would generate the shortened url for every given long url.
In this case you may want to precompute the timeline for users because of the huge data volume and the realtime behaviour we need.
Since this is a spatial search problem, you may want to store the data in a quad tree.
Depending on the requirements, discuss about how you would do partitioning & sharding.
Cache allows you to store the frequently used data and access it much faster which improves the overall response time of your APIs.
In this case you may want to cache that 20% of the data. You can estimate how much cache storage is needed based on each entity data size and your total traffic.
Note that the interviewer may ask you to discuss all of the above step by step at high level as discussed or any one in detail.
More from Sunil Kumar
Here's a list of websites that offer free & beautiful website templates:
🧵👇🏻
1. HTML5UP: Very modern, unique responsive HTML5/CSS3 themes
https://t.co/Nx1IWM7Kho
2. Templatemo: Minimal, resume, gallery themes and more
https://t.co/IRtOxrujUh
3. Templated .co: Tons of minimalistic HTML5/CSS3
4. FreeHTML5: Free & premium HTML5 and Bootstrap themes
https://t.co/YFVkiDM3Th
5. StyleShout: Brilliantly crafted free website templates
https://t.co/AaGAkGlLTV
6. Start Bootstrap: Bootstrap starter
7. Zerotheme: HTML5, Bootstrap, Prestashop templates
https://t.co/UtlaNxGh6Q
8. HTML5xCSS3: Collection of wonderful templates in different categories
https://t.co/fm4AOthUdR
9. Colorlib: Almost any category of theme you can think
10: Free CSS: Huge collection of free templates
https://t.co/S5yQrkp1eq
11. Hubspot: Templates, infographics, banners and much more
https://t.co/T10zTgkIzp
12. Mobirise: Great looking HTML5/CSS3
Here's a list of websites that offer free & beautiful website templates:
🧵👇🏻
1. HTML5UP: Very modern, unique responsive HTML5/CSS3 themes
https://t.co/VmAFs2xEUO
2. Templatemo: Minimal, resume, gallery themes and more
https://t.co/hCVsSqg3dx
3. Templated .co: Tons of minimalistic HTML5/CSS3
4. FreeHTML5: Free & premium HTML5 and Bootstrap themes
https://t.co/HqCj21RVry
5. StyleShout: Brilliantly crafted free website templates
https://t.co/AeNAAvmiYx
6. Start Bootstrap: Bootstrap starter
7. Zerotheme: HTML5, Bootstrap, Prestashop templates
https://t.co/WZtbW1gZzv
8. HTML5xCSS3: Collection of wonderful templates in different categories
https://t.co/g47dzRhSnW
9. Colorlib: Almost any category of theme you can think
10: Free CSS: Huge collection of free templates
https://t.co/JzQgKmBBGJ
11. Hubspot: Templates, infographics, banners and much more
https://t.co/T2jAlXYH8E
12. Mobirise: Great looking HTML5/CSS3
↓
1. Introduction to Python Programming on Udemy
https://t.co/NyCm4YoLMI
2. Learn Python - Full Course for Beginners by freeCodeCamp
https://t.co/xqYNc4zJHh
3. Full Stack Python - Matt
4. Learn Python 3 From Scratch by Educative
https://t.co/ftM9moLZIC
5. Python for Everybody on Coursera
https://t.co/HH2f2Y61NY
6. Learn Python 3.6 for Total Beginners on
7. 100 Page Python Intro - Sundeep Agarwal
https://t.co/DYP24QkpW0
8. Google's Python Class
https://t.co/RYOHCg3Sux
9. Microsoft's Introduction to Python Course
https://t.co/7Xu1OdmQ8Y
10. A Byte of Python (HTML, PDF, EPUB,
If you like this thread, follow me (@sunilc_) for more content like this.
It would mean the world to me if you retweet the first tweet to help me reach more people
10 best free resources to learn Python (2022):
— Sunil Kumar (@sunilc_) July 11, 2022
\u2193
More from Software
Eng managers and directors, we have got to stop asking for "more headcount" and start treating this like the systems problem that it is. https://t.co/XJ0CkFdgiO
When people often have to spend weeks just to get a local development environment up, there is a lot to improve. \U0001f641
— Daniel Schildt (@autiomaa) December 20, 2020
If you are getting barely more than 50% productivity out of your very expensive engineers, I can pretty much guarantee you cannot hire your way out of this resourcing issue. 😐
(the stripe report is here:
Say you've got a strategic initiative that 3 engineers to build and support it. Well, they're going to be swimming in the same muddy pipeline as everyone else at ~50%, so you're actually gotta source, hire and train 6, er make that 7 (gonna need another manager too now)...
...which actually understates the problem, because each person you add also adds friction and overhead to the system. Communication, coordination all get harder and processes get more complex and elaborate, etc.
So we could hire 7 people, or we could patch up our sociotechnical system to lose say only 25% productivity to tech debt, instead of 42%? 🤔
By my calculations, that would reclaim 3 engineers worth of capacity given a team of just 17-18 people.
You May Also Like
@NBA @StephenKissler @yhgrad 1. From Day 1, SARS-COV-2 was very well adapted to humans .....and transgenic hACE2 Mice
1. From Day 1, SARS-COV-2 was very well adapted to humans .....and transgenic hACE2 Mice
— Billy Bostickson \U0001f3f4\U0001f441&\U0001f441 \U0001f193 (@BillyBostickson) January 30, 2021
"we generated a mouse model expressing hACE2 by using CRISPR/Cas9 knockin technology. In comparison with wild-type C57BL/6 mice, both young & aged hACE2 mice sustained high viral loads... pic.twitter.com/j94XtSkscj
@NBA @StephenKissler @yhgrad 2. High Probability of serial passaging in Transgenic Mice expressing hACE2 in genesis of SARS-COV-2
1. High Probability of serial passaging in Transgenic Mice expressing hACE2 in genesis of SARS-COV-2!
— Billy Bostickson \U0001f3f4\U0001f441&\U0001f441 \U0001f193 (@BillyBostickson) January 2, 2021
2 papers:
Human\u2013viral molecular mimicryhttps://t.co/irfH0Zgrve
Molecular Mimicryhttps://t.co/yLQoUtfS6s https://t.co/lsCv2iMEQz
@NBA @StephenKissler @yhgrad B.1.1.7 has an unusually large number of genetic changes, ... found to date in mouse-adapted SARS-CoV2 and is also seen in ferret infections.
https://t.co/9Z4oJmkcKj
@NBA @StephenKissler @yhgrad We adapted a clinical isolate of SARS-CoV-2 by serial passaging in the ... Thus, this mouse-adapted strain and associated challenge model should be ... (B) SARS-CoV-2 genomic RNA loads in mouse lung homogenates at P0 to P6.
https://t.co/I90OOCJg7o
It was Ved Vyas who edited the eighteen thousand shlokas of Bhagwat. This book destroys all your sins. It has twelve parts which are like kalpvraksh.
In the first skandh, the importance of Vedvyas
and characters of Pandavas are described by the dialogues between Suutji and Shaunakji. Then there is the story of Parikshit.
Next there is a Brahm Narad dialogue describing the avtaar of Bhagwan. Then the characteristics of Puraan are mentioned.
It also discusses the evolution of universe.( https://t.co/2aK1AZSC79 )
Next is the portrayal of Vidur and his dialogue with Maitreyji. Then there is a mention of Creation of universe by Brahma and the preachings of Sankhya by Kapil Muni.
HOW LIFE EVOLVED IN THIS UNIVERSE AS PER OUR SCRIPTURES.
— Anshul Pandey (@Anshulspiritual) August 29, 2020
Well maximum of Living being are the Vansaj of Rishi Kashyap. I have tried to give stories from different-different Puran. So lets start.... pic.twitter.com/MrrTS4xORk
In the next section we find the portrayal of Sati, Dhruv, Pruthu, and the story of ancient King, Bahirshi.
In the next section we find the character of King Priyavrat and his sons, different types of loks in this universe, and description of Narak. ( https://t.co/gmDTkLktKS )
Thread on NARK(HELL) / \u0928\u0930\u094d\u0915
— Anshul Pandey (@Anshulspiritual) August 11, 2020
Well today i will take you to a journey where nobody wants to go i.e Nark. Hence beware of doing Adharma/Evil things. There are various mentions in Puranas about Nark, But my Thread is only as per Bhagwat puran(SS attached in below Thread)
1/8 pic.twitter.com/raHYWtB53Q
In the sixth part we find the portrayal of Ajaamil ( https://t.co/LdVSSNspa2 ), Daksh and the birth of Marudgans( https://t.co/tecNidVckj )
In the seventh section we find the story of Prahlad and the description of Varnashram dharma. This section is based on karma vaasna.
#THREAD
— Anshul Pandey (@Anshulspiritual) August 12, 2020
WHY PARENTS CHOOSE RELIGIOUS OR PARAMATMA'S NAMES FOR THEIR CHILDREN AND WHICH ARE THE EASIEST WAY TO WASH AWAY YOUR SINS.
Yesterday I had described the types of Naraka's and the Sin or Adharma for a person to be there.
1/8 pic.twitter.com/XjPB2hfnUC