[Twisted-Python] asynchronous response

Amber "Hawkie" Brown hawkowl at atleastfornow.net
Thu Dec 17 01:09:42 MST 2015


> On 17 Dec 2015, at 08:11, Kevin Mcintyre <kebin70 at gmail.com> wrote:
> 
> Hey - I'm confused, so nothing new :) ...but I'm running at this example and I'm scratching my head.
> 
> http://twistedmatrix.com/documents/current/web/howto/web-in-60/asynchronous-deferred.html
> 
> I would've thought 2 requests could be served simultaneously, but when I fire off 2 requests the first received gets it's response after 5 seconds, while the second response takes 10 seconds.
> 
> I think I understand what's happening, but I don't know why...and I would love an example where the subsequent request doesn't have to wait for the first request to finish.
> 
> Thanks,
> Kevin


I've ran into this before --  browsers sometimes rate-limit requests, and won't actually send the second request until the first is done, over the same connection, rather than making a second TCP connection -- try using cURL or wget, which has no such limitation, and see if it works any better.

- Amber
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: </pipermail/twisted-python/attachments/20151217/21907767/attachment.sig>


More information about the Twisted-Python mailing list