Cracking The Mobile System Design Interview (iOS & Android)
Cracking The Mobile System Design Interview (iOS & Android)
THE MOBILE
Home About Contact Subscribe
INTERVIEW
The aim is to let you demonstrate how you tackle the process of
transforming an abstract set of requirements into a precise and
meticulous solution. It also allows your interviewer to picture the
breadth of your knowledge through the different decisions you make
along the way. While certainly not perfect, they have one significant
benefit over take-home challenges: a considerable reduction of the
time required by both candidate and interviewer.
System design interviews may seem a bit scary, particularly when you
have never done them before or don't have much experience designing
large applications serving millions of users and with dozens of
engineers working on them. There is also an aura of mystery around
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 2 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
how these interviews are set for mobile. If you have searched around,
you have probably realised that there is plenty of materials, courses
and fantastic books explaining how backend system design interviews
work and with help to prepare for them, but not so much for mobile.
We are rookies in the matter, and that's why I decided to share my
experience tackling these interviews both as a candidate and
interviewer.
A rather typical mistake I have seen many candidates do, and I have
done myself as well, is to assume you have 45 min to solve the
problem since that's what the interview lasts. In reality, as you can see
from the schedule above, you will have around 30 minutes to design
your solution. Therefore, keeping track of time is essential. You want to
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 3 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
Your thinking process: How you break a large problem into smaller
parts while keeping the whole picture connected and meeting all
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 4 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
parts while keeping the whole picture connected and meeting all
requirements
The freedom to pick the areas you want to focus on your exercise is a
double-edged sword. It gives you the liberty to drive the conversation
and explore the parts you are more comfortable with, but at the same
time, the interviewer may assume that anything you don't cover is
because you don't know it. Remember that most interviewers (more so
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 5 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
because you don't know it. Remember that most interviewers (more so
in big companies) tend to fall on the conservative side when writing
their evaluation. Hence why the trickiest bit is to strike the right
balance between briefly covering all topics relevant to the question
asked while digging into the more relevant ones for the problem.
Finding this balance is hard to master, mainly because what you and
your interviewer deem relevant may not be the same. Luckily, most
interviewers will give you a hand here. They may hint you when you
are missing something they consider necessary or even ask you
directly to cover a specific part they are interested in exploring.
Therefore, the best you can do is listen to your interviewer and use
her hints to guide your solution. And if in doubt, do not be afraid of
asking her as many questions as you need.
The approach
Below I describe a strategy to tackle mobile system design interviews.
I have developed it over the years from doing these interviews myself
and seeing many successful candidates excel.
6. Wrap up
It's probably the most obvious step and yet is the one where most
candidates fail, myself included —multiple times. Why? Because we
jump to conclusions too quickly. But let's not be too hard on ourselves.
There is a good reason for so many of us falling into the trap. It's a
well-known bias, which the interview environment accentuates (the
pressure to prove yourself).
So, now that you know it, just don't jump to conclusions. Slow down
your wish to start designing your solution and avoid being that
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 7 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
your wish to start designing your solution and avoid being that
candidate who jumps into the solution without fully understanding the
problem. Instead, concentrate on knowing what the interviewer wants
you to focus on, the most relevant challenges of this type of apps, and
what similar situations have you solved previously.
These are a few questions that I found useful to ask at this stage,
depending on the problem:
Who is the user, and how will they use our system?
How big is the team who will implement and maintain our system?
You don't need to ask all of them. Depending on the problem, and the
information you have been provided, some of these questions might be
redundant. Just prioritise the most relevant ones for the task.
Think of similar famous apps or systems you have used in the past and
how they solve a similar problem. What features they offer and what's
their primary functionality. You can suggest many potential features
you can think of and seek agreement with your interviewer on which
features you will focus on in this particular design session. It should be
quite a collaborative part of the interview.
Once the scope is clear and agreed with your interviewer, you are
ready to move to the next step and slowly unfold your solution.
This is when the real fun begins! Once the functional requirements are
clarified, you should switch hats and start thinking on the technical
considerations necessary to build a solution capable of providing the
desired user experience you and your interviewer just agreed.
Let's jump straight into what are usually the most common aspects to
consider when designing a mobile app:
Networking
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 9 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
May any features require low latency to simulate live updates? If so,
how will you push this information to the client? You may need to use a
more sophisticated approach than plain HTTP requests. You could use
push notifications, WebSockets, polling, etc. Each option has trade-offs
for you to consider.
Security
Authentication: How will your solution verify who is the user of your
app (authentication) and how will it guarantee the correct level of
access is provided (authorisation)
Storing sensitive data: Will you need to save the user's credentials?
Yes! Unless you want to offer quite a poor experience where the
users will have to sign-in every time. Which credentials (e.g. access
tokens, refresh tokens)? Do we have to handle Personally
Identifiable Information (PII)? How will you store them securely? (e.g.
Keychain, Smart Lock)
Availability
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 10 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
Availability
Does the app have to support offline mode? Most likely it will, as you
don't want to start your app from an empty state each time the user
opens it. You could use a local store to cache data (e.g. Core Data,
Realm, SQLite, shared preferences, etc.), consider which one and why.
And what happens with images (or other media)? If needed, you can
cache them locally, once retrieved from the network. That's a great
option, but it certainly comes with a few challenges: handling multiple
requests at once, cancelling expired requests, clean-up policy (e.g.
LRU), limiting concurrent requests, etc.
Scalability
You could:
each team can own), and extract reusable components into shared
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 11 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
each team can own), and extract reusable components into shared
and core modules.
Performance
Does the app load heavier data like images, videos, audio? If so, we
should think on how to do it asynchronously, so we keep our UI slick,
while still offering the best possible user experience. For example, by
having a separate service to handle the retrieval of the media data
asynchronously, notifying the UI when ready. What might be the
bottlenecks and challenges of your approach?
Testing
You could briefly mention how you plan to ensure the quality of your
app. Nowadays, the default should be to create a reliable suite of tests,
but how you do this will most likely depend on the requirements (e.g.
are you building an MVP?). You may want to think and describe what
your testing strategy will be.
Explain your testing strategy: How will you apply the different types
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 12 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
Explain your testing strategy: How will you apply the different types
of tests (unit tests, integration tests and UI/Functional tests to cover
end-to-end the main app flows)
Monitoring
You won't usually spend too long on this point unless the interviewer
asks you to. It's important to consider how you plan to ensure the
system’s correctness and facilitate a fast response when things go
downhill. The two most important pillars are usually:
Analytics
Deployment
Pheww... That's a lot to cover and time is tight! But don't worry, the
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 13 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
If you have not been given wireframes, the first step is to draw them
before you go deeper in developing your solution. This step is vital. It
will allow you and your interviewer to agree on the main screens, UI
components, user interactions and navigation flow, which will later
inform your technical decisions. You want to ensure you get your
interviewer's buy-in for how you see the app functioning to meet all
the given requirements.
At this point, you should check with your interviewer if she is expecting
you to cover the end-to-end design or to focus only on the client-side.
Most mobile system design interviews will focus just on the app, but
depending on the level, the type of engineer they are looking for and
the size of the team, they may want you to at least demonstrate you
have a basic understanding of what's going on outside of the app.
Mobile Clients
Backend App (the app which will do most of the heavy-lifting on the
backend side)
At this point, you should have a good idea of the flow you are
designing and the functionality your app will support. It should be
pretty easy to describe the most important data entities applicable to
your problem.
Tip: Do not go into too much detail at first. You are not
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 15 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
Tip: Do not go into too much detail at first. You are not
designing a database schema. You just want to list the entities
(e.g. users, posts, comments), mentioning their most relevant
attributes and relationships. If your interviewer asks for more
detail, you can always go deeper.
Depending on whether your interviewer said the API was given to you
or not when you asked her earlier, you may need to design the
endpoints or not.
Back to the app, it's time to discuss and decide which architecture and
common software patterns your design will follow.
Recall the standard architectures you are familiar with (e.g. MVC, MVP,
MVVM+C, VIPER, RIBs, etc.), as well as the most typical patterns to
abstract and encapsulate logic at the different layers of your system
(e.g. Repositories, Use Cases, Services, etc.). Consider their strengths
and weaknesses when applied to the problem at hand. Which ones
Tip: You will make the rest of the exercise easier by picking a
clean architecture. These architectures make it easier to break
your design into small, individual components, which improves
your solution's scalability, flexibility, and testability. Remember
that your interviewer may start with a relatively simple problem
and then ask you to evolve it to handle more complex scenarios.
The more flexible your architecture is to cope with new
challenges, the easier adapting your system will be when faced
with them.
Unfortunately, I can't tell you the best architecture to pick. That not
only depends on the problem but also your experience. Choosing a
new trendy architecture may be a mistake if you don’t know it well
enough. Instead, I would encourage you to rely on the one you are
more familiar with. It's essential you fully understand the architecture
and each component, as you may need to describe it in detail during
the interview.
Data layer:
Repositories, to retrieve data from the network or the local store
Client
3. Walk over the flow from the user's point of view: What is the user
experience? What does the user see at every step? Describe the
possible view states: Loading, Error, No Data, Data)
4. Explain the Data flow: Data transformations that happen along the
way Network Model → Business Model → View State Model. Draw
arrows to show data flow (different to the dependency arrows, e.g.
use dotted arrows, another colour)
5. And once you have covered all the above, go in-depth into one
component. Think about what might be the most challenging parts,
if the design may have any bottlenecks, etc. For example:
"Real-Time" updates
6. Wrap up
Review the initial scope and functional requirements and how your
design satisfies all of them.
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 19 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
Briefly cover some refinements you would do, if you had more time: Go
over the design and technical considerations described above and
think if you can expand in any of those in a bit more detail. Think of the
technical considerations you may have left aside previously. Now
might be a good time to mention them briefly. Some ideas for topics
you could cover what would your testing strategy look like? How
would you use your system's correctness with crash-reporting and
analytics? How would you make your app more inclusive through
accessibility?
Final thoughts
General advice
Do not be afraid to ask. The question will most likely be vague, and
you need to gather the information required to ensure you are
Know and use your tools. Get genuinely good at drawing diagrams
and synthesising your solution. Time is precious, and this will boost
your speed articulating your solution. Whether it's on a whiteboard
or using an online tool, practice structuring your thoughts in a sharp
and easy to follow manner. Learn to make your diagrams easy to
modify and expand.
Get buy-in for your choices. For every decision you make, mention
the different alternatives you consider, their strengths and
weaknesses and why you pick a particular one and the trade-offs.
Design common apps: Grab your phone and think of the top apps
you use and their most famous/challenging feature (e.g. Mail client,
Mobile system design interviews are like a puzzle. One you have
never built before, but you get to bring the parts to solve it. So make
sure to include a broad set of parts in your toolbox and become
comfortable scrutinising them and selecting the best ones for the job.
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 22 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
Practice before the interview to get great at it, but without memorising
it. There not two equal system design interviews, as there are not two
equal candidates, nor interviewers. Remember that your interviewer is
there to guide you and help you succeed. Please pay attention to the
small hints and suggestions your interviewer gives you and
incorporate those little nibbles of data to your solution.
Thanks for reading this long. I hope you have a better understanding of
what mobile system design interviews entitle: what they consist on,
what your interviewer will be evaluating, plus a reliable approach to
tackling them successfully.
I would love to learn from your experience. If you have other tips or a
different strategy, please share it in the comments.
Resources
Here you have a list of suggested materials (posts, WWDC videos,
courses, etc.) to dive deeper and expand your knowledge in the
different topics touched in this article.
Who am I?
I am a Software Engineer with 15 years of experience. Around ten
years ago, I switched from writing ANSI C for embedded systems to
mobile development. Yeap! Those were the good ol' days with iOS 3,
Interface Builder, Eclipse, the iPhone 3GS, Java, and Objective-C. I have
worked in small projects where I was the sole engineer, and in big
apps with multiple teams and 50+ developers, supporting millions of
users worldwide. I have interviewed hundreds of candidates and I
have done several dozens of interviews as a candidate myself during
all this time from small start-ups to Big Tech companies.
Published by:
SHARE TWEET
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 24 of 25
Cracking the Mobile System Design Interview (iOS & Android) 2/9/21, 4:54 pm
JAN 19 How to replace an inherited third-party app with one e… 6 min read
Powered by Ghost
System theme
https://themobileinterview.com/cracking-the-mobile-system-design-interview/ Page 25 of 25