WSGI Server choice

Hi,
Just for information…
Why choosing uwsgi as wsgi server (tryton docker)?
I know there’s a lot of alternatives (gunicorn, waitress, …)
I saw on multiple benchmarks that Bjoern (https://github.com/jonashaag/bjoern) has the best performances?
What is the best choice?
What do you use in production environment?

When we did our benchmarks several years ago bjoern came ahead but only because it was single threaded. As soon as we configured mod_wsgi (apache) in single thread, both where equally fast (and I bet you wouldn’t notice any difference with gunicorn or uwsgi either) for real world Tryton usages.

I also bet the benchmarks you saw (which were probably the ones we saw) were using several threads for all candidates (except bjoern), that’s why it came ahead.

Also, although I cannot prove it, my feeling is that the multi-thread performance issues came from werkzeug and probably those were improved in the library.

1 Like

We’re happily using mod_wsgi since Tryton 4.0 with no issues so far.

1 Like

I made the choice of µwsgi mainly because it is packaged in Debian and also because it is not written in Python.
I would not want to increase the complexity with a server written also in Python which must evolve at the same speed as Tryton.
But at the end, the WSGI server has not big impact on the feeling of the Tryton speed. If a request seems slow it is almost always because the Python method not because of the network layer.

This is mainly because of the GIL so of Python. But things are improving thanks to projects like Gilectmony, subinterpreter, HPy etc.

1 Like

Let’s do like everybody and rewrite Tryton in Rust :smiley: !

1 Like