by user5994461 · 10y ago · 0 comments
Just a standard case for using fast compiled languages (Java/C#/Erlang/Scala...) vs slow interpreted mono-core languages (python/ruby/php...).
Python and Erlang shop here. Last time I was performance testing some python applications.
2-3 ms for decoding the request (gunicorn internals) + 0.5 for flask + 0.3 ms for newrelic + 0.2 ms for sentry + 0.5 ms spent in the application code (a simple return "hello").
That's a total of 2-5 ms of power and time wasted, not running the application code and creating latency for all calls.
Add that the webserver has to fork to X processes to handle requests in parallel because each request is blocking by design (cf. "global interpreter lock" and common webservers internal).
When the ecosystem (webservers/interpreter/languages) is slow & ineffective (i.e. ruby/python/php). So will be all the applications written on it.
It's trivial to double the performance and half the hardware by switching to a better ecosystem.
Cheers,
Emerson