If your lovingly crafted application is running slowly after deployment, there are five common reasons it runs well on your development machine but has totally borked in production.
There are of course other reasons why your software doesn’t work well in production, but these are the top reasons I’ve seen when developers say “it runs fine on my machine” and then discover that with great volume comes great responsibility for the concerns of scale.
Cause No. 1: You have one big thread
In some modern frameworks (like Node.js), threading is handled for you. You’re supposed to make the right nonblocking I/O calls at the right time to go do things and have your main line of code clean of a lot of heavy lifting. Failing that, you can start to starve the system of actual threads.