Sync to Async Migration
Migrating a live production backend from synchronous to asynchronous, one controller at a time, without a rewrite and without taking the product down.
The problem
All of the backend was written as a synchronous flow. That was fine until the product scaled - as user count and data grew, threads sat blocked waiting on work that could have been awaited, request throughput suffered, and scaling out cost more than it should have.
What was built
A staged migration across controllers, services, and the files underneath them rather than a rewrite. Many individual changes were low risk, since we had already implemented locks on secure data. Converting the whole call chain end to end was the real work.
What I'd do differently
I would design the system to be async from the ground up rather than retrofit it. Failing that, I would migrate all of the services first instead of converting them piecemeal alongside their controllers.