GithubHelp home page GithubHelp logo

Comments (1)

sigmavirus24 avatar sigmavirus24 commented on July 2, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.