[Twisted-web] Non-Blocking I/O?

Jean-Paul Calderone exarkun at twistedmatrix.com
Tue Jan 22 07:45:07 MST 2019


On Mon, Jan 21, 2019 at 8:11 PM <darren at ontrenet.com> wrote:

> Hi,
>   I currently use Twisted Web as a WSGI container for my Flask
> application.
> I'm trying to get good concurrent user requests but running into some
> hiccups.
>
> I see that for each user session that hits my server, twistd creates an
> OS thread. This of course will not scale will with concurrent users.
>

This behavior is defined by the WSGI specification.  If you don't want this
behavior, you don't want WSGI.

Perhaps you want to write a native Twisted application, perhaps using
klein.  Or you could find one of the WSGI variations that aims to support
asynchronous operation instead of multithreaded operation (but Twisted
doesn't provide a container for any of those).

Jean-Paul


>
> Is there a better way or perhaps command parameter I can use to support
> concurrent users with something like non-blocking IO which can handle
> thousands of concurrent users.
>
> thanks!
> Darren
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-web/attachments/20190122/97c6c5ee/attachment.html>


More information about the Twisted-web mailing list