net/http: improve proxy handling #37623
Comments
Is this issue possible to reproduce? It would be helpful to provide a snippet that can reproduce it, then it's easier to investigate this issue. |
Here is a sample of how I use proxies:
I put voluntarily a free proxy (from spys.ru) which had a bad uptime (maybe the proxy is dead). The thing is, it waits 10 seconds to return that the proxy is bad. The exemple here may seem a little silly. But when I use a lot of proxies and I run a good amount of requests in multiples workers, when a proxy is down, it slow down everything by waiting the page timeout. Maybe should we implement a timeout to test proxy before (I don't know how we could do that).
I'd like to get a thing like this, it looks more structured than just putting our proxy as parsed URL to the transport. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm running requests (using go-resty library, based on default HTTP client). This problem is I need to use proxies, some of proxies are dead (public proxies) and so, they don't answer the request.
I started learning Go not a long time ago, but when I was programming in C#, the proxy handling was good, I mean :
What did you expect to see?
Proxy integration that respond better or that skips wrong/dead proxies faster.
What did you see instead?
Mainly performance losses, and when I use public proxies, Go seems not connecting to all proxies while some are really working.
(Original issue from go-resty: go-resty/resty#320)
The text was updated successfully, but these errors were encountered: