-
Notifications
You must be signed in to change notification settings - Fork 327
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
Multithreading support for python amd how does ngonx-unitnis different from apache web server #33
Comments
Currently there's only one Python application thread per application process. Support for multiple threads is planned.
How is nginx different from apache? Unit uses completely different, modern architecture. It contains main, controller, router, and application processes. Each process is isolated for specific purpose, which makes Unit extremely secure and robust.
Thus, it is modern, fast, secure, lightweight and dynamically reconfigurable server. When Unit will be production ready and feature rich, it will significantly simplify web stack and improve scalability. |
Thanks for the explanation VBart. Looking forward for the threading support in python. Do you know the timeline of Python Application Threads? Also, I know it is related to same, are there any plans to support asynchronous calls (i.e. async io or event based concurrency in python)? |
@eulhaque It's not in a short term plan. Our current goal is to stabilize current functionality and provide all the essentials to run classic WSGI applications. While threads support is a good optimization, it's less important than some other features that Unit is currently missing to be suitable for production use. |
As Unit has reached v1.0, have you a vision when threads for python can be supported ? I tried, unsuccessfully, to use New Relic with Unit v1.0 and according to New Relic support, the problem is related to the lack of threading support in Unit. |
@urba1n this ticket is about running WSGI applications in multiple threads in order to reduce memory usage. It has nothing to do with threading support inside Python. It should work well already. What's the problem with New Relic? |
Sorry, New Relic support points me to this particular issue, saying the issue is related the way NGINX Unit disallows multiple threads. Using new relic I get the following errors which prevents the application from running. |
@urba1n You can open it in order to track updates and share information with community. We have already seen this error on another application. A fix for it is on review right now. It's not related to threads, but to a bug in our WSGI implementation. |
Thank you very much. Issue #107 has been opened. |
Multithreaded request processing in Python apps can be configured since Unit 1.21.0. |
ningx unit delegates request to individual python worker processes, right? Is there a way to allow multiple threads in each python worker processs so for io bound application we can use threads and increase the number of request to handle?
Also just wondering how is it different than apache web server which has almost the same offering and you can even run multiple applications using the same server via different virtualhost configs?
The text was updated successfully, but these errors were encountered: