TL;DR: When a small app gets a sudden wave of users, from a post that takes off, a launch or a press mention, the web server is rarely what breaks first. What breaks is everything with a hidden limit behind it: the AI or transcription provider's rate limits, database connections, a queue with one worker, signup emails, third-party API quotas and the support inbox. Before a spike I find those limits, put slow work behind a queue, make the app degrade gracefully instead of falling over, and set up a dashboard and a few switches I can flip without a deploy. Most of it takes a day or two, and it is far cheaper to do before the spike than during it.
Most small products never see a real traffic spike, and the ones that do usually get no warning. That was the lesson of LectureNotes AI, the AI note-taking app I co-founded, which reached 15 million organic Instagram views in two months and grew to nearly 10k users. Organic social reach does not arrive on a schedule. A video does nothing for a day and then a few hundred thousand people see it overnight, and a share of them all try the product within the same few hours.
I have also built for spikes I could see coming: live leaderboards on RAQTS, where everyone checks the board at the same moment an event ends, and voice agents that get a burst of calls when a campaign goes out. Here is what I check, in the order things tend to break.
What actually breaks first
Founders imagine the website going down. On a modern stack that is the least of your problems: static pages sit on a CDN, and serverless functions scale out far beyond what a small app needs.
What does not scale automatically is anything with a fixed limit that you agreed to months ago and forgot:
- Model and transcription API limits. Every AI provider caps requests and tokens per minute on your account tier. A spike of new users all trying the core feature at once hits that cap long before your servers notice anything.
- Database connections. Serverless functions scale out happily, and each instance opens its own connection to a database that might accept a few dozen. The functions are fine. The database refuses new connections.
- Workers and queues. If slow jobs like transcription run through one worker, a spike turns a two-minute wait into a two-hour wait.
- Third-party quotas. Email sending limits on a new domain, SMS throughput, auth provider rate limits, free-tier caps on whatever service you wired in during the MVP.
- Your own attention. Support messages, bug reports and refund requests all scale with users. You are the one part of the system that cannot autoscale.
So the first job is not load testing. It is writing down every limit.
Step one: write down every limit
I make a short table with one row per external dependency: the provider, the limit that matters (requests per minute, tokens per minute, connections, emails per day), what we use on a normal day, and what happens when we hit it. It usually takes an hour of reading dashboards and pricing pages.
For an AI app the table always surprises someone. The model provider's limit is tied to your usage tier, and on a young account that tier is low. Raising it can take days, sometimes a support request, sometimes a minimum spend. That is exactly the kind of fix you cannot make in the middle of a spike, so I raise limits ahead of any planned launch and keep a note of how to ask for more quickly.
Then I do rough maths. If 5% of the people who see a post try the app in the first six hours, and each first session triggers one expensive AI step, how many of those steps per minute is that at the peak? Compare it to the limits in the table. Whichever row fails first is the work for this week.
Step two: put slow work behind a queue
The single most useful change for a spike-prone AI app is moving slow work out of the request. In LectureNotes AI, the expensive path is a recorded lecture going through transcription and then summarisation. Neither should happen while an HTTP request waits for it.
The pattern I use:
- The upload or request is accepted immediately and a job is written to a queue.
- Workers pull jobs at a rate the downstream provider can handle.
- The user sees an honest status ("processing, usually a few minutes") and gets a notification when it is done.
A queue turns a spike from an outage into a delay. If a thousand users upload at once, the provider sees a steady stream inside its limits, and users see a longer wait instead of an error. It also gives you one dial to turn: add workers if the provider allows more, slow them down if you are being rate limited. I covered the upload side of this in recording long audio in a mobile app, and the retry behaviour for each job in calling LLM APIs in production.
Two details matter here. Jobs must be safe to retry, so a worker that crashes halfway does not charge the user twice or produce two summaries. And the queue needs a visible depth and age, because "how many jobs are waiting and how old is the oldest" is the first number you will want during a spike.
Step three: protect the database
Postgres, MongoDB and Firebase each fall over differently under a burst.
- Connection limits. With serverless backends, put a connection pooler in front of Postgres, or use the provider's pooled connection string. Check the max connections on your plan against the max concurrency of your functions.
- The one slow query. Under normal traffic a missing index costs 200 milliseconds and nobody notices. Under a spike it holds connections open and everything queues behind it. I look at the slowest queries from the last week and index the ones on the signup and first-session path.
- Hot documents. In Firestore, many users writing to the same document (a global counter, a shared leaderboard) runs into per-document write limits. Counters should be sharded or computed in the background.
- Reads that could be cached. Anything every new user loads, like a pricing table, onboarding content or a public leaderboard, can be cached for a minute in Redis or at the CDN. One cached response instead of ten thousand identical queries.
Step four: degrade instead of failing
You cannot make every part of a small app spike-proof, and you should not try. What you can do is decide in advance what gets switched off first, so a spike makes the app slower or simpler rather than broken.
I keep a short list of switches, usually as feature flags or kill switches that change without a deploy:
- Pause or limit the expensive feature for free users while keeping it working for paying ones.
- Turn off non-essential background work, like analytics exports, reminder emails or recommendation refreshes, to free capacity for the core path.
- Lower per-user limits temporarily, so one enthusiastic user cannot hold a worker for an hour.
- Show a waitlist or "we're busy" screen on signup if things go badly, instead of letting people sign up into a broken experience.
A clean "you're in the queue" message keeps far more goodwill than a spinner that never ends. People who hit an error in the first minute rarely come back.
This connects directly to money. A spike in an AI app is also a spike in cost, which is why the free tier needs to cap the expensive step before the spike, not after. I went through that side in the unit economics of an AI app.
Step five: watch it live
During a spike I want one screen that answers "are new users getting value right now?" That is not CPU usage. It is a handful of numbers:
- Signups per minute and first-session completions per minute.
- Error rate on the core feature, split by cause (rate limited, timed out, failed validation).
- Queue depth and age of the oldest job.
- Provider usage against the limits from the table.
- AI spend for the day.
Alerts should fire on these, not on server metrics. I wrote about setting that up in error monitoring and alerting for a small product. The useful test is whether you would find out about a problem from the dashboard before you find out from a comment under the viral post.
Step six: get the humans ready
A spike brings a burst of support messages, and many of them repeat: how do I export, why is my upload still processing, how do I cancel. Before a planned launch I write saved replies for the top five, add a status line in the app for known delays, and make sure refunds and account deletion requests have a path that does not depend on me being awake. The full setup is in user support for a small app.
Also check that verification and password reset emails from a new sending domain will not get throttled at volume. If signup needs a verified email, a stuck email provider is a broken signup.
Should you load test?
For most small products, a light load test is worth an afternoon, but only after you have written down the limits. Testing your own servers mostly confirms they scale. The useful test runs the real first-session path, including the queue and the AI step against a test key or a mocked provider with realistic latency, at the peak rate from your rough maths. What you are looking for is which row of the table breaks first and whether the switches work. Do not run it against a live model provider at full volume; you will hit your limit and pay for it.
The checklist I use before a launch
- Every external limit written down, with today's usage and what happens at the cap.
- Provider tiers raised ahead of time where the maths says they need to be.
- Slow and expensive work behind a queue, with retry-safe jobs and visible depth.
- Database pooling in place, slow first-session queries indexed, shared reads cached.
- Kill switches for the expensive feature, background work and new signups.
- A live dashboard of signups, core-feature errors, queue depth and spend, with alerts.
- Saved replies, a status message and working signup emails.
None of this is exotic engineering. But it decides whether a lucky week turns into users or into an apology post.
I build AI products, mobile apps and the backends behind them for startups in the US, UK and Europe, and I have seen what organic growth does to a small stack. If you have a launch coming up and want a second pair of eyes on what breaks first, read more about my background or book a call.