# A System Design interview with a Google engineer

### Interview Summary

**Problem type**  
Distributed databases  
**Interview question**  
How would you organize a database such that you can add more machines once your current ones reach maximum capacity.

### Interview Feedback

**Feedback about Space Pheonix (the interviewee)**  
Advance this person to the next round?  
 Yes  
How were their technical skills?  
3/4  
How was their problem solving ability?  
1/4  
What about their communication ability?  
3/4  
> You had lots of practical knowledge of the field, which really came through.  
> I did have some issues understanding exactly what some of your proposals were. You had the high-level details down, but when it came to specifics like exactly how data would be distributed or queries would flow through this hypothetical database, I wasn't exactly clear at times.  
> Otherwise, great work!

**Feedback about Intergalactic Avenger (the interviewer)**  
Would you want to work with this person?  
 Yes  
How excited would you be to work with them?  
1/4  
How good were the questions?  
4/4  
How helpful was your interviewer in guiding you to the solution(s)?  
4/4  
> An open ended question but really an everyday problem that we run. We had a great discussion exploring different ways of solving this problem and the interviewer had good enough understanding of depth of the problem and discuss them further to solve the problem. Nice discussion! Thanks!

### Interview Transcript

**Intergalactic Avenger:** Hello?  
**Space Pheonix:** Hi.  
**Intergalactic Avenger:** Hey, how's it going?  
**Space Pheonix:** Good, how are you?  
**Intergalactic Avenger:** Good, good, doing good. Alright, so if it's okay, I'll just jump right in with a technical question.  
**Space Pheonix:** Yes, sure.

> ...
  
**Intergalactic Avenger:** Okay, no that's essentially... because that's definitely going to spread it out so that all of the machines are getting you know the current orders and the past orders so all the machines are kind of spreading them out. Another challenge for you here... so if you split it up by letter, some letters are going to be more popular than others, so there's many more last names that start with the letter T than start with the letter W.

**Space Pheonix:** So I have a strategy coming to it. So I was thinking of see the pattern of orders coming from... we really have to study the pattern last like a few months and see where the number of orders really coming and then that's how we have to decide the number of letters to go on to some machine X and machine Y.

> ...
  
**Intergalactic Avenger:** Well, actually if you think about it, so if you are the reporting server and you are trying to get the all the days orders, you still have to ask every single machine because you know, somebody with the last of the name with the letter P is going to have an order and someone with the last name of the letter Q is going to have an order, so you have to still ask all the machines when you're reporting, so that's I think that's actually not a big problem. I don't think it slows down the reporting aspect of it.

**Space Pheonix:** Okay um yeah, so could be so that's again that load balancer probably let's say if it is just a select query, then we could have and so probably we need to distribute the load balancer now.

> ...
  
## Unique ID generation  
  
Microsoft Interviewer  
Invincible Cloud, a Microsoft engineer, interviewed Golden Possum  
[Watch interview](/content/mocks/microsoft-system-design-unique-id-generation/index.html)  
  
## Order statistic of an unsorted array  
  
Google Interviewer  
Intergalactic Avenger, a Google engineer, interviewed Supersonic Taco in Java  
[Watch interview](/content/mocks/google-java-order-statistic-of-an-unsorted-array/index.html)  
  
### Most frequent integer and pairs of integers sum  
  
Google Interviewer  
Paisley Wallaby, a Google engineer, interviewed Propitious Bear in Java  
[Watch interview](/content/mocks/google-java-most-frequent-integer-and-pairs-of-integers-sum/index.html)  
  
## Triplet Array  
  
Google Interviewer  
Rocket Wind, a Google engineer, interviewed Whirlwind Alligator in C#  
[Watch interview](/content/mocks/triplet-array/index.html)
