Browsing articles tagged with "haproxy - 6/14 - Admins Goodies"
Aug 18, 2011
tom

HAProxy – forward to a different web server based on URI

I have an HTTP farm with the following configuration: listen webfarm 10.254.23.225:80 mode http balance roundrobin cookie SERVERID insert option httpclose option forwardfor option httpchk HEAD /check.txt HTTP/1.0 server webA 10.254.23.4:80 cookie A check server webB 10.248.23.128:80 cookie B check I would like to add some option which would forward all requests for a specific URI (i.e /special) to a 3rd web server. How should I do it? Here is a blog post I wrote […]

Continue Reading »
Aug 18, 2011
tom

HA Proxy and Disaster Recovery – Only access server if others are down?

Why I expect this is not the best way to solve the problem, I got thinking tonight. I’m thinking about geo-locating servers. Given we have a load balancer + two servers to handle traffic in NA (North America) and one server in the EU. If the two US servers die, is it possible to get HAProxy to direct traffic automatically to the EU one. However, I don’t want to use a roundrobin approach for the […]

Continue Reading »
Aug 18, 2011
tom

How can I use HAproxy with SSL and get X-Forwarded-For headers AND tell PHP that SSL is in use?

I have the following setup: (internet) —> [ pfSense Box ] /-> [ Apache / PHP server ] [running HAproxy] –+–> [ Apache / PHP server ] +–> [ Apache / PHP server ] -> [ Apache / PHP server ] For HTTP requests this works great, requests are distributed to my Apache servers just fine. For SSL requests, I had HAproxy distributing the requests using TCP load balancing, and it worked however since HAproxy […]

Continue Reading »
Aug 18, 2011
tom

Normalize Accept-Encoding via HAProxy for optimized Squid hit rate

Our website infrastructure uses HAProxy for load balancing, a Squid cluster for caching, and application data is on an IIS cluster. We load balance HAProxy by URI to optimize the Squid hit-rate, but we know that Squid is holding different copies of each page based on the Accept-Encoding header passed to it by the browser, and so IE (gzip, deflate) will have a different copy of a cached page than Firefox (gzip,deflate) or Chrome (gzip,deflate,sdch). […]

Continue Reading »
Aug 17, 2011
tom

Stunnel too many clients

I’m trying to hook up stunnel and haproxy to forward https connections through to some backend servers. I’ve got haproxy setup right, and I seem to have stunnel set up right. Trouble is that when I hit the setup with a load test after a while I start to see these log entries (I’ve included the last few entries from proper connections before I started to get the connection rejected error): 2010.05.05 11:23:29 LOG7[3498:3086792368]: https […]

Continue Reading »
Aug 17, 2011
tom

Keepalived alternative for Solaris 10

We are considering an architecture like the one in the picture for Solaris 10 That is, high avalaibility software load balancers in front of web and application servers. Unfortunately, Keepalived is not available for Solaris at the moment. Is there an equivalent artifact for substituing Keepalived which is supported in Solaris 10? Is there an equivalent architecture for Solaris using HA SW load balancing? Thank you. Yes you can look at Solaris Cluster : http://www.sun.com/software/solaris/cluster/ […]

Continue Reading »
Aug 17, 2011
tom

haproxy not passing X_FORWARD_FOR on HTTP POST

I’ve setup HAProxy with the option forwardfor option so it’ll pass on the user’s IP to PHP via $_SERVER[ "HTTP_X_FORWARDED_FOR" ]. If the page request isn’t a POST it’s populated fine but if it is then it won’t be populated. Any ideas where I’ve gone wrong? Thanks everyone! My whole HAProxy conf file for reference: global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 #chroot /usr/share/haproxy user haproxy group haproxy […]

Continue Reading »
Aug 17, 2011
tom

HAproxy roundrobin balancing does not appear to be distributing evenly

I know that with loaded servers, roundrobin in HAproxy (1.4.4) does not evenly distribute, but my servers are currently getting NO traffic (test setup), and roundrobin balancing does www1,www1,www1,www1,www1,…www2,www2,www2,…,www1… I’m verifying this by having the script being run on each server cat /etc/HOSTNAME (slackware). I need to have it switch back and forth each time to test some session stuff (stored in shared memcached) but am having trouble getting it to switch between my two […]

Continue Reading »
Aug 16, 2011
tom

HAProxy to the rescue? (multiple machines w. vhosts)

This is more of a ‘best practice’ or ‘input appreciated’ question. Currently we manage about 5 webservers (in two DC’s) that run Nginx for PHP websites. The plan is to redesign the setup so it is more manageable from an administrative point of view. One server is in a DC in another network, the rest in a single rack. We sometimes have to move clients website(s) from one server to another and we would like […]

Continue Reading »
Aug 16, 2011
tom

hardware recommendations for HAProxy for a small or medium traffic site

I am interested in setting up HAProxy for use as a load balancer for a set of small traffic web applications. The use is growing and might become medium sized in the near term (6 months or so). Mainly we are looking balance load becuase some customers want their own dedicated server, some what to be as low cost as possible so to accomodate we seem to need a load balancer. I looked at the […]

Continue Reading »
Pages:«123456789...14»