Re: multi location and cookie persistence on SERVERID
Ok, I understand now why you're doing like that :) Let me update Willy's example: frontend site1 bind :80 monitor-uri /check monitor fail if { nbsrv(local) le 0 } acl local_ok nbsrv(local) gt 0 acl site2_ok nbsrv(site2) gt 0 acl site3_ok nbsrv(site3) gt 0 acl is_site1 hdr_sub(cookie) SERVERID=a acl is_site2 hdr_sub(cookie) SERVERID=b acl is_site3 hdr_sub(cookie) SERVERID=c use_backend site2 if is_site2 site2_ok use_backend site3 if is_site3 site3_ok use_backend site2 if !local_ok site2_ok use_backend site3 if !local_ok site3_ok default_backend local backend local # handles site1's traffic as well as non-site specific traffic # all cookies are prefixed with "a" cookie SERVERID server srv1 1.0.0.1:80 cookie a1 check server srv2 1.0.0.1:80 cookie a2 check server srv3 1.0.0.1:80 cookie a3 check backend site2 # reroute traffic to site 2's load balancer option httpchk GET /check server site2 2.2.2.2:80 check backend site3 # reroute traffic to site 2's load balancer option httpchk GET /check server site3 3.3.3.3:80 check Note that I have not tested this example, so there may be some mistake. The idea here is to count the number of available server in a backend, then take routing decision based on this information. Each site must monitor its local backend and provide it's status to other (monitor* lines) and pick up status from remote backend. Tell me if you managed to configure your setup. cheers
Re: Geotargeting and Server DOWN problem
Hi, On 26.01.2012 18:45, Sebastian Fohler wrote: I'm trying to setup a loadbalancing configuration with four backend server on nginx basis. The first problem I had was, while checking the haproxy stats, that they show every backendserver is at least the same time DOWN as it is UP, how can this be, and what could be the problem? Are you doing active check against the backend servers using haproxy? Another problem I have is that the backend servers are using geotargeting to deliver specific content to specific country locations, since the haproxy loadbalancing has always the same ip the seem to be some confusion with the geotargeting after activating haproxy. You might use real ip (http://wiki.nginx.org/HttpRealIpModule) and the haproxy 'option forwardfor' to solve the geotargetting problem. Greets, Sander
Geotargeting and Server DOWN problem
I'm trying to setup a loadbalancing configuration with four backend server on nginx basis. The first problem I had was, while checking the haproxy stats, that they show every backendserver is at least the same time DOWN as it is UP, how can this be, and what could be the problem? Another problem I have is that the backend servers are using geotargeting to deliver specific content to specific country locations, since the haproxy loadbalancing has always the same ip the seem to be some confusion with the geotargeting after activating haproxy. Can someone help me to find out which configuration would be need to overcome these obstacles? Thank you in advance. Best regards Sebastian -- Sebastian Fohler Far-Galaxy Networks Web: http://www.far-galaxy.de Tel.: +49 (0)173 8796211 E-Mail: i...@far-galaxy.de
Re: Clear Sticky Session/Cookie
Willy Tarreau 1wt.eu> writes: > > Then in theory what you're looking for is called "content switching" : use > whatever information you can find in a request to decide where to forward > it. The principle will be to have as many backends as possible destinations > (20 in your case) and to use ACLs + "use_backend" rules to direct them. > > The issue I see in your case is that you can't know what domain is being > requested when looking at SSL. In fact, there is the SNI (server name > indication) extension which some browsers do use but not all to the best > of my knowledge. If we see enough adoption of this, I would have no problem > implementing a decoder for it, as it would help ! With the adoption of the cloud in masses lately, most cloud providers don't allow more than one IP per server, which ties the hands of people that need multiple SSL Vhosts. I would agree that HAProxy should have an SNI decoder, especially since most browsers now support it in the latest versions and it would only help IPv4 IP space ;) -k
Re: multi location and cookie persistence on SERVERID
I followed some willy's advise in a old mail http://permalink.gmane.org/gmane.comp.web.haproxy/3238 Le 26/01/2012 17:08, eni-urge...@scan-eco.com a écrit : hello thank you for your advise. I dont know why i configure 2 different backend. I think i saw this config on a website and thinking that was the best for me. Le 26/01/2012 07:33, Baptiste a écrit : Bonjour, Well, as far as I can see, this is due to your configuration! Why routing user in the frontend using the persistance cookie? You should take routing decision based on the number of servers remaining in a backend or using some options like "allbackups" and puting all your server in a single backend with backup keyword for the servers which are not located locally. If you need more help for both configuration, let me know. cheers
Re: multi location and cookie persistence on SERVERID
hello thank you for your advise. I dont know why i configure 2 different backend. I think i saw this config on a website and thinking that was the best for me. Le 26/01/2012 07:33, Baptiste a écrit : Bonjour, Well, as far as I can see, this is due to your configuration! Why routing user in the frontend using the persistance cookie? You should take routing decision based on the number of servers remaining in a backend or using some options like "allbackups" and puting all your server in a single backend with backup keyword for the servers which are not located locally. If you need more help for both configuration, let me know. cheers