Aodh m version new feature-Remove Eventlet from Aodh in favour of threaded approach

Source: Internet
Author: User

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:

    1. Werkzeug WSGI Server without Eventlet
    2. 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:

    1. Https://github.com/openstack/telemetry-specs/blob/master/specs/liberty/remove-web-eventlet.rst
    2. Http://docs.openstack.org/releasenotes/aodh/mitaka.html

Aodh m version new feature-Remove Eventlet from Aodh in favour of threaded approach

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.