AISim › Chapter 4: Running it for real

The nightly job ate the day

Level 17. A million tickets to summarise, and live users get 429s.

Someone kicked off a job to summarise and tag every support ticket from the last year. It runs through the same real-time API as your live chat. Now 60% of your traffic is a background job nobody is waiting on, it's eating your rate limit, and live customers are getting errors.

Goals

Concepts: Batch APIs, Async workloads, Rate limits.

Hint

Not every request needs an answer in seconds. Where could work that can wait a few hours go instead?

What you learn

Separate work that someone is waiting on from work that can wait. Providers offer batch APIs at roughly half price with results within hours, and batch jobs don't compete with your live traffic for rate limits. Real-time capacity is precious: keep it for real-time users.

More in this chapter

This interactive level needs JavaScript. Built by (cybernerdie).