lundi 13 février 2017

Eventlet wsgi server and database access time

Vote count: 0

Let's assume we have an WSGI app which is hosted on an event-driven single-threaded server:

from eventlet import wsgi
import eventlet

def app(env, start_response):
    # IO opeartions here

wsgi.server(eventlet.listen(('', 8090)), app)

Within app function, some I/O operations such as reading files or DB access must be performed.

Now, when we perform IO operations in app, the server is effectively blocked and can't serve other clients.

Q: What are possible solutions to this problem? How can I get Eventlet wsgi server perform time-consuming operations while not getting blocked?

asked 15 secs ago

Let's block ads! (Why?)

Eventlet wsgi server and database access time

Aucun commentaire:

Enregistrer un commentaire