Re: Haproxy as simple proxy forwarding each request
On Wed, Jan 29, 2014 at 07:32:37PM +, Jonathan Matthews wrote: > On 29 January 2014 17:59, Ricardo wrote: > > Hello, > > > > Is a bit mess situation but I can't configure Haproxy as a simple proxy. > > > > The behaviour I'm looking for is an Haproxy listen in port 80, receiving > > request to any url and forward each request to the appropiate domain > > trought his own gateway. > > It sounds to me like you're looking for a /forward/ proxy, which > *really* isn't HAProxy's forte. I seem to recall it can /just/ about > be mangled into doing something like what you want, but you'll have > much more luck looking at Squid for this - that's one of its primary > use cases. > > To confirm that you are actually looking for a forward proxy, answer > this: are you able to deterministically list *all* of the domains that > you wish to load-balance? Or are you looking to balance "whatever a > user might type into their web browser"? > > Also - when you mentioned the internet gateway, do you really just > mean a router? I.e. a box which is *just* moving packets, and not > looking inside each HTTP request and then routing them based on the > Host header it finds? > > Back to forward proxying: if you don't like Squid, then Nginx can, > with a bit of force, be made to do the job pretty well. Varnish may > also be able to achieve it with its more recent kinda dynamic backends > [citation required; possible rubbish being spouted]. > > But I wouldn't personally go through the pain of trying to make HAProxy do > this. In order to complete your response, I'd add that haproxy does not perform any DNS resolving which is why that usage is not appropriate. So clearly, better pick a real proxy. Regards, Willy
Re: Haproxy as simple proxy forwarding each request
On 29 January 2014 17:59, Ricardo wrote: > Hello, > > Is a bit mess situation but I can't configure Haproxy as a simple proxy. > > The behaviour I'm looking for is an Haproxy listen in port 80, receiving > request to any url and forward each request to the appropiate domain trought > his own gateway. It sounds to me like you're looking for a /forward/ proxy, which *really* isn't HAProxy's forte. I seem to recall it can /just/ about be mangled into doing something like what you want, but you'll have much more luck looking at Squid for this - that's one of its primary use cases. To confirm that you are actually looking for a forward proxy, answer this: are you able to deterministically list *all* of the domains that you wish to load-balance? Or are you looking to balance "whatever a user might type into their web browser"? Also - when you mentioned the internet gateway, do you really just mean a router? I.e. a box which is *just* moving packets, and not looking inside each HTTP request and then routing them based on the Host header it finds? Back to forward proxying: if you don't like Squid, then Nginx can, with a bit of force, be made to do the job pretty well. Varnish may also be able to achieve it with its more recent kinda dynamic backends [citation required; possible rubbish being spouted]. But I wouldn't personally go through the pain of trying to make HAProxy do this. Jonathan
Haproxy as simple proxy forwarding each request
Hello, Is a bit mess situation but I can't configure Haproxy as a simple proxy. The behaviour I'm looking for is an Haproxy listen in port 80, receiving request to any url and forward each request to the appropiate domain trought his own gateway. Client 192.168.1.5 --> Haproxy 192.168.1.254 --> InternetGateway 192.168.1.1 I think that this can be done with a basic conf, but I don't know how. Thanks and sorry,