haproxy

Handling OPTIONS request in nginx

We're using HAProxy as a load balancer at the moment, and it regularly makes requests to the downstream boxes to make sure they're alive using an OPTIONS request: OPTIONS /index.html HTTP/1.0 I'm working with getting nginx set up as a reverse proxy with caching (using ncache). For some reason, nginx is returning a 405 when an OPTI...

Load Balancing in Amazon EC2?

We've been fighting with HAProxy for a few days now in Amazon EC2; the experience has so far been great, but we're stuck on squeezing more performance out of the software load balancer. We're not exactly Linux networking whizzes (we're a .NET shop, normally), but we've so far held our own, attempting to set proper ulimits, inspecting ker...

Any thoughts on RightScale and Scalr for dynamic Ec2 instance managment

Hi Am looking for a cost effective tool for managing an web app on Ec2. Rightscale seems to the big dog and charges for it. Scalr looks like a more cost effective solution but hard to find out any real customer experiences.. The key aspects I'm looking for is a load balancer (http and https) and a way to automatically bring online add...

Why won't haproxy capture my cookie?

I'm having trouble getting frontend cookie capture to work in haproxy. I have this in my config: frontend frontend 0.0.0.0:9999 [snip] capture cookie foo len 10 Then I use nc to talk directly to the server and send it: GET / HTTP/1.1 Cookie: foo=bar I get a log line, but there's a "-" where the captured cookie should be. ...

Apache handeling SSL requests and passing them through to HAproxy

I am trying to set up as a front end reverse proxy with Haproxy forwarding requests to Apache web servers in the back end. My problem is that I have been unsuccessful in getting it to work with SSL requests using Apache. I know that Haproxy can not handle SSL requests so I am trying to set up Apache to accept the clients requests on po...

Can HAProxy front both Web servers and SSL VPN on one IP and port?

I need a Reverse Proxy to front both Lablz Web server and SSL VPN Adito (SSL Explorer fork) by sitting on one IP/port. Failed to achieve that with Nginx. Failed to use Adito as a generic reverse HTTP proxy. Can HAProxy fall back to being a TCP proxy if it does not sense HTTP traffic? In other words can it fall back to Layer 4 if its Lay...

Elastic Load Balancing in EC2

Hi Its been on the cards for a while, but now that Amazon have released Elastic Load balancing what are your thoughts on deploying this solution for a high-traffic web app. Should we replace HAProxy or consider ELB as a complimentary service in front of HAProxy Appreciate any comments or suggestions Thanks Dom ...

HAProxy and "sharding"

I was wondering if anyone has used HAProxy for sharding. Specifically, I would like to be able use a cookie I define w/a identifier and have any client that presents that cookie/identifier combination be directed to the same server. It seems possible and my preliminary tests seem to work but I am not a sure. My listen configuration look...

How to configure HAProxy to consolidate outbound appserver connections

I would like to use my HAProxy server to consolidate out bound application server requests. My application interacts with 3rd party, external services and I would like to be able to interact with these services using a single IP address. I would also like to be able to do this via HTTP and HTTPS. Any examples on the configuration to do t...

Send Redirects To Specific Ports

I have an Rails application server that is listening on port 9000, and is being called through haproxy. All my redirects from that server are being redirected back through port 9000, when they should be sent back on port 80. I am using a combination of haproxy + nginx + passenger. Is there a way to make sure all redirects are being sent...

Mongrel Gzip Compression

I would like to compress my mongrel's output, I found this plugin, but it's from 2007, and I could not make it work. I have haproxy balancing among several mongrels on my server, I've apache, but it's used only for static content, so mod_deflate doesnt affect the page itself. Any suggestion? If haproxy could compress, that would do it...

How to enable timeout per each restful web service method

How would one go about setting timeouts for each REST API method on the server side. For example I have certain web service methods that upload images and I want to increase the timeouts for these methods compared to ones that have lower http payloads. Architecture I am dealing with: haproxy, nginx, tomcat ...

haproxy as frontend to varnish throwing lots of 50X errors with status cD

Hi, I've a setup with haproxy as frontend to two varnish servers (say srvA, srvB). srvA and srvB also have nginx running on 'em and varnish serves as frontend to these servers. Few days back we collected stats to find out how many requests being served by varnish cache (i.e. with two X-Varnish values) were getting timed out on haproxy. ...

haproxy acl not working in https/tcp mode

Hi guys, I have strange problem, it looks like I can't get acl to working in tcp mode, as all workd under http mode. Here you go my config. frontend http *:80 acl http_test_acl path_beg -i /test use_backend http_test if http_test_acl default_backend http_default backend http_test balance roun...

Haproxy Beginner Problem!

Hello everyone, I currently am using haproxy to do reverse_proxy on my end. Unfortunately, I cannot get it to work!. This is my config: backend twisted mode http timeout connect 10s timeout server 30s balance roundrobin server apache1 127.0.0.1:11111 weight 1 maxconn 512 backend cometd ...

Regex pattern to parse HttpLog format

I am looking for a regex pattern matcher for a String in HttpLogFormat. The log is generated by haproxy. Below is a sample String in this format. Feb 6 12:14:14 localhost haproxy[14389]: 10.0.1.2:33317 [06/Feb/2009:12:14:14.655] http-in static/srv1 10/0/30/69/109 200 2750 - - ---- 1/1/1/1/0 0/0 {1wt.eu} {} "GET /index.html HTTP/1.1" A...