My experience at System Design Interviews Amazon,Facebook,Adobe

Hello Guys,

My Experience: 12 years in Software backend development C/C++/Linux.

Following questions asked at following companies:

1. Amazon Interview(Feb/2020)

Question: URL Shortening service.

Frankly speaking I had started my preparation for FANNG in dec/2019 and I was not prepared, But still i managed to comewith decent design.
Done Back of Envelope.
Presented High level design showing load balancers, ssl terminators, web servers etc.
Logic How short URL Is calculated using Hash.
Then told if hash collisions happen, if load increases, memcached. Bit indepth.
And time gone up!!
At FANNG they provide exact 45 min, so my time's gone. ...

I did my reasearch on shortURL, you can find it here
https://github.com/amitkumar50/Code-examples/tree/master/System-Design/Scalable/tinyurl

2. Facebook (Feb/2021)

Question: Botnet design

Interviewer was pretty cool made me comfortable, then he clarified the questions.

  • Q1. How botnets will create a attack?
  • Q2. How master node in botnet design will communicate with slave nodes? What information would be sent in packet?
  • Q3. What's the criterion for selecting slave botnet nodes?
  • Q4. When master botnet node dies, how's new master is selected?
    • For selecting new master i told there might be election something similar to OSPFv2 DR election and master might be selected.

I was able to answer all the questions, to depth of my knowledge.
And he wants indepth answer to each and every question.
Since I have not heard and practiced botnet, Interviewer does not considered my design as good design.
REJECTED.

I did my research on BOTNET, you can find it here
https://github.com/amitkumar50/Code-examples/tree/master/System-Design/Scalable/Botnet

3. Adobe(May/2021)

Question: Client Application in dropbox service design

Interviewer came straight to question and asked me following:

  • Q1: How client application in dropbox is designed?
  • Q2: Components of client application?
    • I told 4 components (Chunker, Internal DB, Watcher, Tranciever) and explained functions of each and how they communicate with each other and dropbox server
  • Q3: How chunk size is decided?
    • I told server will inform about chunk size to client application depending on size of file
    • Client application will store hash of chunk, and based on hash it will decide which chunk has changed and will send changed chunk to server.
  • Q4: Then he asked gone into more details of chunking, Let's consider we have a file of 9 words, chunk size=3 words.
    • Total 3 chunks
    • User added x in start or y after chunk, how it will identify which chunk to send?
    • Whole recalculation of hash will happen or not?
      • I came with design where particular chunk, can be sent by storing the offset inside file and comparing the size of file has changed or not?
      • My design passed in 2 testcases but he broke in 3rd and asked me to rethink..
file     abc def hij
chunk  1    2   3
hash  h1  h2  h3 

I did my research on dropbox system design and specifically client application design, you can find it here
https://github.com/amitkumar50/Code-examples/tree/master/System-Design/Scalable/Dropbox_or_GoogleDrive

My Quests?

  • 1. How and to which depth we should study system design
    • For botnet, I have never seen it I was not able to tell exactly how botnets communicate?
    • For dropbox, I have seen this, given complete modular design, but he gone into depth tried and broke it on some or other use case
    • How much width and depth is required.
    • I see videos on internet, blogs about TAO (facebook) etc but you cannot remember everything and apply every thing learned into design round, when not relevant
    • I have read
      • Overlay Networks Toward Information Networking. by Sasu Tarkoma (z-lib.org).pdf
      • Distributed_Systems_Tanenbam_3rd_edition.pdf
      • Taken Groking System design course from Udemy
  • 2. Is joining any DSA+System design Crash courses good?
    • I came across Scalar Academy, given then Self-Assesement test(scored 90%) and then they started giving how they can help in System Design and DSA.
    • Are these courses efficient?
    • These academies tell they will provide a project to work and design system like(uber, netflix etc) in 3-4 months
      • I have 12+ yrs of experience, I do software module design, spend 90% of time writing c++ code using boost or c++ stl, But that's not handy in system design interviews.
      • Speaking loud, I think writing complete code of Uber(its front end in Java/React/Python etc), backend, their Databases (may not be big app) but app taking 1 user, using Google APIs to search cabs would not be that easy in 3-4 weeks.
      • Even I write it, how it will help in Botnet System design or Dropbox client design or URL Shorting design?

Seeking the answers..

Thanks
Amit

Comments (4)