http pipelining over single TCP connection
See original GitHub issueDoes grequests
support http pipelining
? Multiple requests (“Connection: keep-alive”) over single TCP connection without waiting for answer.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
HTTP pipelining - Wikipedia
HTTP pipelining is a feature of HTTP/1.1 which allows multiple HTTP requests to be sent over a single TCP connection without waiting for...
Read more >Connection management in HTTP/1.x - MDN Web Docs - Mozilla
Pipelining is the process to send successive requests, over the same persistent connection, without waiting for the answer. This avoids latency ...
Read more >Using HTTP Pipelining to hide requests - DigiNinja
Pipelining allows multiple requests to be grouped together and sent over a single TCP connection, this eliminates the need to setup and tear ......
Read more >HTTP Keep-Alive, Pipelining, Multiplexing and Connection ...
HTTP /2 introduced the notion of a stream, which allows a bidirectional flow of bytes to be exchanged over a persistent TCP connection....
Read more >HTTP 1.1 Pipelining is not supported with Envoy - AskF5
HTTP /1.1 without pipelining: Each HTTP request over the TCP connection must be responded to before the next request can be made. ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@qo4on I had a thought about this over the weekend. I wonder if your problem would be solved by avoiding using a session altogether – As in, creating a new session for every request.
My theory is that interleaved requests using the same underlying TCP connection are causing your problem. By default, when you use a session, the TCP connections will be reused. If you do not use a session object, a new session will be created for each request, which should also mean a new TCP connection will be created for each request.
You will have to pass in any necessary headers/cookies to each request, but I think this may help you send multiple requests concurrently, instead of needing to do them all serially.
Thanks. I wrote a message to their support team and they fixed some errors. Finally this code works. I have no idea why it works, but it works, it returns
fd = [1, 2, 3, 4, 5...]
as it should. I tried to do the same with httpx and had incorrect values for all filesfd = [1, 1, 1, 1, 1...]
.