In the kilo version, the API WSGI application can be deployed in the following 2 ways:
- As a Python command that runs a werkzeug-based Web server which is monkeypatched to use Eventlet.
- As a WSGI application hosted by any WSGI server, often Apache + mod WSGI.
WSGI host benefits are good performance and high scalability.
Werkzeug + eventlet command-line benefits are simple and easy but poorly performing and difficult to debug.
Eventlet will monkeypatches the socket module to provide non-blocking network I/O.
Eventlet Another problem is that when socker occurs, such as when the client frequently fails to read the data from the server, the problem is difficult to debug.
Aodh uses a third-party Werkzeug WSGI Server, which supports multi-threaded/process, so it can be easily replaced directly.
http://werkzeug.pocoo.org/docs/0.11/
So the deployment of the modified service becomes:
- Werkzeug WSGI Server without Eventlet
- Apache + mod Wsgi
The code that uses Werkzeug in Api/app is:
from Import serving serving.run_simple (host, Port, app, Processes=conf.api.workers)
Since the use of Eventlet is eliminated throughout the project, the messaging also needs to be replaced with multithreading from Eventlet:
---a/aodh/messaging.py+ + + b/aodh/messaging.py- [endpoint], executor='eventlet ',+ [endpoint], executor='threading',
Other services such as Aodh-listener,aodh-notifier, Aodh-evaluato,aodh-expire or using Oslo_service.
Reference:
- Https://github.com/openstack/telemetry-specs/blob/master/specs/liberty/remove-web-eventlet.rst
- Http://docs.openstack.org/releasenotes/aodh/mitaka.html
Aodh m version new feature-Remove Eventlet from Aodh in favour of threaded approach