What to audit before you scale
A code audit before app scaling checks the code that fails under load or under attack: queries and indexes, background jobs, caching, authentication and untested error paths. It looks for problems that are cheap to fix at ten customers and expensive at ten thousand.
Start with data access, because slow queries and missing indexes are a frequent cause of trouble in young codebases. Then look at anything that runs on a schedule or a queue, since retries and duplicate work multiply with traffic. Check how the app handles a failed payment, a timeout from a third party or a user doing something unexpected. Finally, measure the technical debt that slows every change and decide what to pay down first. Our guide on how to reduce technical debt covers that last step in detail.

