Bugpit

Lessons › From one user to millions

Run it at night

A daily job updates every customer's invoice. Someone set it to 20:00, right on top of your evening peak, and now the site falls over at the same time every day.

Play this level

Free with an account. It runs in your browser: build the design, press Run, and watch what breaks.

The lesson

A Scheduler starts jobs at set times, like cron or EventBridge Scheduler. It's simple, and that's the danger: nothing warns you when a job and your busiest hour land on the same database.

Traffic has a shape. It peaks at 20:00 and it's lowest around 03:00, at about 4% of the peak. A job that wrecks the evening goes unnoticed at night.

If every job in the company starts at midnight, you've built your own traffic spike. Spread them out, and watch the hours either side of the peak as well as the peak itself.

What you have to achieve

4,000 requests a second at the busiest hour, 5% of them writes.

What you learn

Same job, same machines, no new cost. You only moved it. Before buying anything, check whether the work can wait for a quiet hour. It often can.

Check yourself

What fixed the evening crash, at no extra cost?

Show the answer

Moving the job to a quiet hour. Same job, same machines. At 03:00 traffic is about 4% of the peak, so the job goes unnoticed.

Every job in the company starts at midnight. What's the risk?

Show the answer

You build your own traffic spike. Spread jobs out, and watch the hours either side of the peak too.

Try it yourself

More in From one user to millions

← Ask in plain words Numbers as they happen →