Design Crash Diagnosis and Fix Rollout for an Employee App
Find out why an internal desktop app is crashing on 15,000 of 25,000 employee laptops around the world, and get a fix onto those laptops in safe stages.
Problem statement
Design the system a company uses to find out why its desktop app is crashing on thousands of employee laptops, and to get a fix onto those laptops.
For this exercise, assume a company has 25,000 employees working in offices in the Americas, Europe and Asia. Each employee has one company-managed laptop. Every laptop runs the same internal desktop app, built by the company's own engineers, plus a small management agent installed by IT.
The agent can send data to company servers and can download and install a different version of the app. The servers cannot open a connection to a laptop; the agent always calls the servers when it is online.
One week, 15,000 of the 25,000 employees start seeing the app crash, some of them many times a day.
Engineers need to see quickly whether this is one widespread problem, find what the crashing laptops have in common (app version, operating system version, hardware model, region), and open enough detail to find the cause. Then they ship a fix: either a new app version or a return to the last version that worked.
The fix goes out in stages so that a bad fix cannot break every laptop at once, and the team can see which laptops have it and whether the crashes stop.
Laptops are often offline: many are shut overnight and some sit on slow home or hotel networks. A crash report can include a memory dump, a copy of part of the app's memory, which may hold customer or employee data. Building and testing the app itself, operating system updates and helpdesk tickets are out of scope.
What to build
- When the app crashes, the laptop's agent sends a crash report with a crash signature, stack trace, app version, operating system version, hardware model and region; reports made while offline are sent once the laptop reconnects.
- Engineers see crashes grouped into issues, with how many reports and how many different laptops each issue affects, and can break an issue down by app version, operating system version, hardware model and region.
- Engineers can open the stack traces of an issue and, for a sample of its crashes, the memory dumps; only approved engineers can open memory dumps.
- The team can send a fix, a new app version or the last good version, to laptops in stages, see for each laptop which version it should run and which it reports running, and pause or undo the rollout.
At scale
- For this exercise, assume each affected laptop crashes up to 10 times per working hour, so during the incident the servers must accept up to about 150,000 crash reports an hour (about 40 a second on average, with peaks when a region's working day starts).
- For this exercise, assume a crash summary (signature, stack trace and laptop facts) is about 20 KB and a memory dump is about 50 MB, and memory dumps are kept for 30 days.
- For this exercise, assume a new widespread issue must appear on the engineers' dashboard within 5 minutes of its first reports arriving.
- For this exercise, assume the fix must reach at least 95% of laptops that come online within 24 hours, and its first stage may include at most 1% of laptops (250).