[Twisted-Python] How to improve response time of twisted.web?

alex clemesha clemesha at gmail.com
Fri Mar 28 14:11:43 EDT 2008


On Fri, Mar 28, 2008 at 12:12 AM, Pavel <pbastov at gmail.com> wrote:

> Yes, I see what you mean.
>
> I really love Twisted, and will never switch to Apache or the like, since
> I like
> its simplicity and the ability to have all my code in one place.


Forgive me if the following is not what you are looking
for but, I would recommend a setup like this:

Use a fast and light server/reverse proxy
like nginx ( http://wiki.codemongers.com/Main ) to

1) handle all static files (img,js,css, static html)
2) reverse proxy all your dynamic twisted.web part

I use this setup, and it works great with Twisted.

-Alex




>
> On Fri, Mar 28, 2008 at 12:27 PM,  <glyph at divmod.com> wrote:
> >
> >  On 03:57 am, pbastov at gmail.com wrote:
> >  >Thanks for the replies.
> >  >
> >  >In fact, I just tried to compare it against the static files -- almost
> >  >the same result --
> >  >a little bit faster, but far from Apache :(
> >
> >  Twisted is not, and has never been, as fast as Apache in this kind of
> >  naive raw-speed comparison on static files.  It's probably not as fast
> >  for most other things either.
> >
> >  If you would like to make it faster, there's no trick or configuration
> >  option or tweak.  The solution is simple: optimize the code.  This may
> >  just involve using a profiler and submitting patches, this may involve
> >  using some tool like cython or rpython to put the really critical parts
> >  into an extension module.  Nobody else has volunteered to do this so
> far
> >  because Twisted is, in fact, fast enough for most things :).
> >
> >
> >
> >  _______________________________________________
> >  Twisted-Python mailing list
> >  Twisted-Python at twistedmatrix.com
> >  http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> >
>
>
>
> --
> Good luck,
>
> Pavel Bastov
> xooChat Team Leader
> http://www.xoochat.com/
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080328/c90c63c7/attachment.htm 


More information about the Twisted-Python mailing list