Use ab to stress test the interface, and you will know whether it will crash and whether the speed is acceptable.
In case of crash, use PM2 to start the service. PM2 can automatically wake it up for you.
PS: Your encryption operation here takes 69ms, but finish takes 600ms. If this finish refers to http finish, the biggest performance bottleneck is your framework
Multiple people register at the same time...
How much more can it reach 10k? Moreover, it is all blocked and encrypted synchronously. It will not crash, it will just be slower.
If you are worried, just take a test and you will know.
It will not crash. CPU operations cannot be asynchronous. All asynchronous operations are IO operations
I want to know what kind of complex encryption is it that takes so long? I found that multiple new Date() also have time differences
Use ab to stress test the interface, and you will know whether it will crash and whether the speed is acceptable.
In case of crash, use PM2 to start the service. PM2 can automatically wake it up for you.
PS: Your encryption operation here takes 69ms, but finish takes 600ms. If this finish refers to http finish, the biggest performance bottleneck is your framework
Since you can’t accept it, change the encryption process to asynchronous one