Where's the slack?
How much time the system has before a person notices. This one question shapes most designs.
By devskills editorial team · Last updated
This is one of the most useful questions in the app, and candidates rarely ask it. Slack means how much time you have before a person notices that something has not happened yet.
Take two products that look the same on a whiteboard. Ride hailing: a person stands on the street with a phone, waiting for a car. Food delivery: a person ordered dinner, and the restaurant needs fifteen minutes to cook it.
Both are "match a customer with a driver". But ride hailing has no slack at all. Every second of matching is a second someone stands in the rain watching a spinner. So the matching must be quick and simple: take a good driver now, not the best driver in forty seconds.
Food delivery has fifteen minutes of slack, hidden inside the cooking time. Nobody is watching. So you can collect orders for a minute, group them together, wait for a better courier to finish, and hand out the whole set in the best way. That is a different system, and it is better because the slack is there.
Same-looking problem. Opposite designs. What separated them was not size or technology. It was how long you have before someone notices.
Slack decides "do it now" versus "do it soon" more than anything else. No slack means the work happens right away, inside the request, while the user waits. Slack means the work goes on a queue and happens shortly after. That is cheaper, survives failures better, and lets you group work together. Ask this question before you draw anything.
- —A person is outside, watching a spinner. Ten seconds feels broken.
- —Match fast and simply: a good driver now beats the best driver later.
- —Finding the perfect match is the better algorithm and the wrong product.
- —The user sees failures as they happen.
- —The restaurant is cooking. Nobody is watching the assignment.
- —Collect orders, group them, wait for a better courier, then assign them all well.
- —Clearly better assignments, hidden inside the cooking time.
- —You can retry, re-plan and change your mind before anyone notices.
- Slack is the time before a person notices, not the time before the machine finishes.
- No slack means do it now, inside the request. Slack means queue it and group it.
- Two products that look the same get opposite designs when their slack is different.
- Every problem page in this app answers this question directly.
Finding the slack in three messages from one app
An online shop sends three kinds of message: a one-time login code, a "your order has shipped" notice, and a weekly email of recommendations. They look like one feature, "send a notification". Ask where the slack is for each, and the design splits three ways.
- 1Login code: almost no slack
The person is on the login screen, waiting. A code that arrives after 30 seconds feels broken, and after a few minutes it has probably expired. So it is sent straight away, on its own, on the fastest channel, with a retry within seconds if the provider fails. It never waits behind other messages.
- 2Shipping notice: minutes of slack
Nobody is staring at their inbox for this. If it arrives two minutes after the parcel is scanned, nobody notices. So it goes on a queue: the order service records "send shipped notice" and moves on, and a worker sends it shortly after. If the email provider is down for five minutes, the worker retries and nobody can tell.
- 3Weekly recommendations: days of slack
Nobody is waiting for this one at all, and Monday or Tuesday makes little difference. So it is a batch job: compute the recommendations overnight, then send in bulk at a rate the email provider accepts. Being hours late costs nothing; sending everything in one burst could get the sender rate-limited.
- 4Keep the slow ones away from the fast one
Because the slack differs, the three must not share one queue. A million weekly emails in the same queue as login codes would put a code behind the whole batch. So the design has a priority path for codes, a normal queue for order notices, and a scheduled batch for the digest.