-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Production WSGI server #299
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #299 +/- ##
===========================================
- Coverage 96.99% 94.24% -2.75%
===========================================
Files 21 22 +1
Lines 1064 1095 +31
===========================================
Hits 1032 1032
- Misses 32 63 +31
Continue to review full report at Codecov.
|
55583bd
to
c68fcec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow...awesome review!
This seems to give a tendency towards cheroot which seems a good choice though less known.
However, when checking these out I stumbled across the following blog post: https://fgimian.github.io/blog/2018/05/17/choosing-a-fast-python-api-framework/
In there, it is mentioned that CherryPy (Cheroot) is ruled out bc it was slow, but more importantly that flask was ruled out as a WSGI framework since it was slow and that falcon is apparently blazingly fast and "The no-nonsense REST API and microservices framework for Python developers," which sounds pretty good for our use-case. Now, this will cause some additional effort to test whether the framework makes a significant difference, as that would indeed require some rewriting, but I am wondering whether it makes sense to take a look.
Also, Bjoern is claimed to work for python 2 and 3: https://github.com/jonashaag/bjoern . Apparently, it is a strong choice for containerized environments:
- https://github.com/kubeup/python-wsgi-benchmark
- https://www.appdynamics.com/blog/engineering/a-performance-analysis-of-python-wsgi-servers-part-2/
Beyond that I noticed that uwsgi is supposedly very complex and overloaded.
In summary, it seems cheroot is a decent choice, Bjoern may be better and apparently using Falcon instead of Flask could strongly affect speed, but would require a bit of rewriting...
https://github.com/jonashaag/bjoern/blob/9a6409138c645c47f6fd1d161e84a40daebabb04/bjoern/request.c#L354 |
14339c6
to
7e4a0f7
Compare
4dae7a3
to
fe4f811
Compare
1d8d056
to
a8e692f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small version comment, otherwise lgtm!
a8e692f
to
66bce9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good! Can we delete flask from the requirements?
No, since we're still using the flask WSGI application. Just no longer the server. But that's a great point, gotta rename the flask_server file |
This commit adds the documentation for the WSGI server choice including the tests run and our decision
This commit exchanges the previously used Flask server with the Cheroot WSGI server and ensures compatible logging. The Flask server was not intended as a production server, which is why we did the change. Fix #11
This commit adds a loadtest to the GitHub actions pipeline to ensure the Connaisseur performance when under stress Fix #154
a45aeac
to
cf8cc75
Compare
Use a production WSGI server to host the WSGI Connaisseur application. Load and stress testing led us to choose cheroot by a slim margin.
PR also contains some loadtests for the pipeline integration tests