I've been a software architect for most of my professional life, and system design has always been my bread and butter.

Here are 7 steps that I would advise you to follow to ace your system design interview.

They will bring you further than ever, promised.

A thread. ↓
0. Foreword

As a software architect and tech lead, I had the chance to interview some very bright engineers throughout my career.

I've also interviewed quite a few times myself.

This approach is the one that I would use to design a system.
I highly believe that this approach is the one you should use in your interviews, as it's an incremental and organized workflow.

Your goal is that your interviewers understand what you design.

This enables them to follow along as you design.
1. Clarify the requirements

Ask questions and a lot of them.

Try to find out what exactly the interviewer expects from you.

Try to narrow it down as far as possible to the exact scope of the problem.

Even if the question is to (re)design an existing system, ask.
The amount of questions you could ask is nearly endless, but here are some ideas for you:

- Are there multiple frontends (App + Website + more)?
- Are there regulatory requirements?
- Do we need our own auth, or can we leverage an existing one (like Facebook/Google, etc.)?
- Are there other consumers than the known clients planned for our APIs?
- Do we need third-party integrations?
- Do we want to incorporate a data lake for analysis?
- Any requirements on data consistency?
2. Define system interfaces

Define all APIs that the system will need.

Explain what each API is for as detailed as possible, so the interviewer can jump in and tell you if you got a requirement wrong.

If you got something wrong, no problem, adjust accordingly.
To give you a general idea, take a platform like Instagram, for example, which will need APIs to:

- Upload and view images,
- Retrieve the feed
- Store and retrieve comments for an image
- Store and retrieve likes
- Manage your profile
- Manage people's followers
- Store and retrieve stories
- Manage story reactions
- etc.
As you see, existing systems are already pretty large, so it makes sense, and it's absolutely okay to ask your interviewer if you should really lay out everything you could think of or if you should only focus on one part of the existing system.
-> Illustrating system interfaces

You can, for example, start with a use case diagram, which is a great way to identify and showcase possibly needed APIs. A use case diagram showing three example use cases:  1. Fetc
3. Estimate the scale of the system

Give estimates to the scale of the system and communicate them clearly.

Once again, if you got a requirement wrong, the interviewer can tell you, and you can adjust.

If not, the interviewer can better understand your design decisions.
You don't need to give an exact estimate here.

Throw a number in the room which you find reasonable.

In the case of well-known platforms, inform yourself before the interview.

The numbers for Instagram, Facebook, etc., are all out there on the internet.
Regarding numbers, we talk about:

- Active daily / monthly users
- being transformed to an estimate about how many API requests/s your system should be able to handle
If you interview at an organization that has such a well-known platform, you can impress your interviewer if you have the numbers at hand.

This shows that you are really interested in the company and have done your homework.
You don't have to memorize those numbers exactly, it's not even about 1 or 2 million more or less, but you shouldn't be off by hundreds of millions.

Being off by such a large amount could lead to design decisions you would not have made otherwise.
4. Define the data model

Define the data model of the system, and define how data flows.

Ask how detailed this step should be and if your interviewer requires it at all.

If it's required, also explain and maybe visualize how data flows between the components of the system.
Leverage relational models where applicable, but don't forget that there are other types out there, as well, like documents, graphs, and many more.

Try to use the most appropriate ones for the entity at hand.
It might, for example, make sense to leverage graphs for friendship-like relationships or follower relations, as well.

If you find such a graph model fitting, use and model the entity accordingly.
Don't forget to lay out how the entities move through the system.

For example:

The feed service fetches a user from the user service.

The user entity thus travels from the user service to the feed service, and maybe even further.
You don't have to come up with the exact solution that the engineers of an existing platform came up with.

That's not what the interview is about.

Add the properties you may find fitting and which are just enough to fulfill the requirements.
Your users, for example, will most likely need a forename, a name, an ID, an email address, and so on.

Common thought can already bring you far here.

If you are really unsure, ask your interviewer.

It's their job to give you hints in such a case.
-> Illustrating entities and data flow

You can use a UML class diagram, draw a box with properties in it, or list the properties of an entity to describe the data. A diagram showing different versions of how to picture an en
To illustrate the data flow, you can use simple illustrations to showcase how the data flows for certain operations. A diagram picturing the data flow of an entity.
5. Draw a high-level design

Most systems only have a few crucial components that make up the core of the system.

Try to identify them and draw boxes for the five most important ones, and visualize their interactions.
Especially in modern microservice environments, services communicate with each other (a lot).

If service A needs some data managed by service B, you already have two boxes and one arrow to draw to illustrate that communication.
Remember: If you have already modeled the data flow of certain entities, reuse this information here.
-> Illustrating the high-level design

Once again, a simple illustration with some boxes and some arrows, including descriptions, is enough to showcase the design you have in mind. An illustration with boxes and arrows showcasing how a syste
6. Design components in detail

Explicitly ask if you should focus on specific components for this step.

If not, choose the three most important ones and visualize/explain how they should work and what they should do in detail.

A good interviewer will guide you.
Take an image service, for example, that is one of the core components of an Instagram-like system.

It offers an API to retrieve images, which is handled by an internal implementation.
To store images, it needs access to some kind of storage handled by another internal implementation.

Lay all that out, draw diagrams to illustrate your ideas, and help the interviewer understand what you are designing.
-> Illustrating detailed components

You could try to resemble a UML component diagram to illustrate a detailed service view, for example. A UML component diagram that shows an Image service and its
7. Explicitly state bottlenecks

Every system and every design has its limits.

If there are bottlenecks in your system (and there will always be), state them explicitly.

Give detailed explanations about what affects them and how you could mitigate them.
This step requires the most knowledge about the components you used to design your system.

You'll have to know, for example, when relational databases fall behind NoSQL storages noticeably or in which situations certain message brokers are not the best choice anymore.
Maybe a relational model was good for the anticipated scale of the system, but migration becomes a pain at some point?
You can be pretty creative in this step, but once again, you need to know the advantages and disadvantages of components and also the design principles you built your system upon.
Sometimes interviewers will also jump in and give you hints or state a bottleneck they found explicitly.

That's your chance to discuss it with the interviewer and find a solution together.
You don't have to be able to recall each and every disadvantage, but be able to state the most important ones.
8. Thread end

That's it for this thread. 💛

I hope you found something useful in it for you. 🙏🏼

If you enjoyed reading this thread, drop a like, retweet the first tweet, and follow me (@oliverjumpertz) for more content like this.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Oliver Jumpertz

Oliver Jumpertz Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @oliverjumpertz

31 Jul
For the last two weeks, I posted at least one thread every day about cracking your tech interview, marketing yourself, and growing as a software developer.

Here is a collection of the threads I published.

And there are many more to come in the future.

A thread. ↓
1. "Are there any questions left we can answer?"

This inconspicuous question is one of the most important ones in any interview.

This is where you can shine and make a lasting impression.

2. "Where do you see yourself in five years?"

Many candidates hate this question because we usually don't even know where we will be in a few months.

You can, however, use this question to your advantage and here is how.

Read 17 tweets
30 Jul
Cracking a tech interview is one thing, but it's a whole other level of difficulty to get an interview at all.

Marketing yourself takes time, but there is a way to minimize your efforts: LinkedIn.

Let's see how you can use LinkedIn optimally to market yourself.

A thread. ↓
0. Foreword

I have used LinkedIn for quite some time now and put some great effort into optimizing my profile and approach.

Before I decided to go down the content creator route, I had at least 10 recruiters (more often 20 to 30) contacting me daily about new roles.
As soon as I set myself as "open to offers," I can't even catch up with all the messages I get anymore.

This is not to brag but to prove one point: LinkedIn gives you visibility, leading to potential interviews.
Read 40 tweets
28 Jul
Data structures and algorithms are important for any software developer.

Sometimes loved, more often dreaded, but at the core of our craft.

Here is an introduction to the most important data structures, including learning resources.

A thread. ↓
1. Why you need to learn them

The reality is: You will and should never implement many data structures yourself on the job.

There are libraries for this purpose. Either a language's standard library or a commonly used library will provide them for you.

But is this all?
To decide which data structure you need in what case, you should know about them in the first place.

You need to know:

- Which exist
- What they are good for
- How they work
- Their runtime characteristics (time and space complexity)
- Their pros
- And cons
Read 32 tweets
27 Jul
I've started to develop software at the age of 12. That was 21 years ago.

Here is some advice I want to give to any aspiring software developer trying to learn the craft and getting into the industry.

A thread. ↓
1. Spend more time on the why

Ask yourself honestly why you want to learn to develop software.

It is okay to go for the money. In many countries, software developers earn top salaries.

But you should always be aware of your own motives.
If you constantly tell yourself you do it because you love it, while silently thinking that it's for the money that helps you support your family, you could actually end with burnout or depression.
Read 22 tweets
26 Jul
Determining what salary to ask for is difficult.

You ask for too much, and you are shown the door.

If your demand is too low, you'll be underpaid for a long time.

Let's see how you can find the right amount to ask for.

A thread. ↓
1. Do your research

This is important. Often, you don't even have a good idea of which amount of money is actually fair to ask for.

You need to do research to find out what others in similar positions earn.

This usually gives you a basic idea of what range you can aim for.
You can start with salary calculators like PayScale or Salary but only use them as a rough indicator.

Their results are based on the voluntary input of data by people like you.

If someone provides a fake salary, it affects the outcome negatively.
Read 27 tweets
25 Jul
"What is your current salary?"

Have you ever encountered this question in an interview, or has a recruiter ever asked you this?

This is one of the most critical and morally questionable questions to ask a candidate, and here is how you deal with it.

A thread. ↓
1. Determining the value of work

Before we talk about the question and how to handle it, we need to talk about how the value of work is determined.

With this knowledge, you will understand the catch of this question and why answering honestly puts you at a disadvantage.

1/31
To completely cover a topic as deep as how to value work, it would definitely need a thread or even a book on its own.

We will thus go with a pretty simplified version that gives you at least a basic idea of how it works.

2/31
Read 32 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(