|
|
|
|
|
by VHRanger
1202 days ago
|
|
Right, if your issue is that you're getting a ton of small, individual API calls, python will suffer. At that point you'd look to Go or another language, and also carefully choose the REST API framework you're setting up. Note that having a solution setup where the end result is "a ton of small, individual API calls" could possibly indicate a bad system architecture. |
|
Or just a lot of clients with a fair bit of shared state which is best kept resident, which is a pretty common use case.
It's a bummer to write python code that works well, and then maxes out at 130% CPU load when you grow your usage... and not have any obvious path to scale upwards despite you having 32 threads of execution around. Then, you can rewrite some of the more expensive things in native code to squeeze a little more performance, or add indirection to store the data somewhere else so multiprocessing works.
Other languages that have more finely grained locks scale 3-4x higher with minimal thought, and much, much higher with a bit of thought about how to handle locking and data model.
> At that point you'd look to Go or another language
Well, yah... this is us complaining about Python's concurrency problems.