Comments (1)
@andy-maier looking at your StackOverflow question you're saying you don't want to use things that are the standard for achieving this. You don't want to use a load balancer because you don't want a single address (which doesn't make a great deal of sense) but fine. Is there a reason you're not leveraging DNS on your internal network? That would allow you to specify hmc-service
as a DNS name which resolves to N
addresses. urllib3
would then retry those until they find one that works. There's countless StackOverflow questions around using dnsmasq and other free software to do exactly this.
In short, none of this is what one would expect of a typical HTTP client library providing the level of interface we provide. And urllib3 isn't exactly the right place for this either. If you want something like this, your issue in the client library is probably the best place because whatever logic you think is "right" here probably isn't right for a large enough percentage of requests or urllib3 users.
Put another way, many things operate in a fashion you're describing - databases with redundant servers as one example. In those cases the client libraries for those things do not rely on the underlying TCP libraries to allow users to specify how to connect/what redundant addresses are they either:
- Specify it at the client level (e.g., tell the library you want it to behave a certain way and either tell it the redundant addresses or have the remote service tell you how to find them)
- Specify it another way outside of the library's control (e.g., DNS; if you're on an IaaS that supports IP swapping, have a healthcheck that dynamically swaps the IP address of the thing you're trying to connect to over to one of the healthy redundant hosts; etc.).
Finally, the answer you received will not work likely because it looks like an AI hallucination to me and the person answering likely doesn't understand what is happening. SOCKS is a proxy protocol that is almost certainly completely unrelated to what you were asking so you don't need that at all. In fact, I'm 99% certain that's an LLM hallucination because the SOCKS Proxy Manager does not have any resolver
attribute whatsoever and neither does the class it inherits from.
from requests.
Related Issues (20)
- requests 2.32.3 with IPv6 link local address fails with error: [Errno -2] Name or service not known HOT 1
- 2.32.3 does not load system CA certificates when using an Adapter HOT 3
- GET请求,我希望传递% 但是requests会默认帮我编码为%25,如何解决? HOT 1
- requests.utils. atomic_open does not respect umask HOT 1
- Feature Request: `safe_json()` Method for Requests Library HOT 1
- auth headers lost when requests process redirected requests HOT 1
- inconsistent handling of verify and REQUESTS_CA_BUNDLE HOT 1
- requests library seems to ignore "Transfer-Encoding" header HOT 1
- ValueError: Timeout value connect was <object object at 0x7c6b5e484a80>, but it must be an int, float or None. HOT 1
- Requests v2.32.0 caused the error `Segmentation fault` when including the `cert` parameter HOT 1
- Check for codes HOT 1
- Unclear file handling in documentation examples HOT 2
- catch FileNotFoundError if there aren't any certificates HOT 1
- requests > 2.31.0 - Unhashable type 'list' for 'cert' parameter HOT 1
- RFC9113 - HTTP/2.0 HOT 1
- Possible .get bug in version 2.32.3 HOT 2
- PDF download is distorted using requests HOT 1
- Frequently hangs or times out when trying to fetch https://openssl.org/source/ HOT 3
- I am having error on requests.post HOT 1
- Error when headers return 'Location' as an app://xxxx although I have set disable redirects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from requests.