News for hackers. Stuff that matters.
Re:Show HN: Run SSH and HTTP(S) on the same port by shanemhansen on Wednesday January 21, 2015 @06:37PM (#8926534)
haproxy is truly a swiss army knife. I recently worked on a geographically distributed 300 server deployment, and our ops team ran haproxy on every node just for ssl termination and the operational insight and flexibility it provided.
Re:Show HN: Run SSH and HTTP(S) on the same port by IgorPartola on Wednesday January 21, 2015 @09:06PM (#8927103)
AFAIK, it's the only web server that is able to log when a client first connects. Otherwise, attacks a la slowloris go unlogged as the attack is happening.
Re:Show HN: Run SSH and HTTP(S) on the same port by jimktrains2 on Thursday January 22, 2015 @03:34AM (#8928136)
HAProxy isn't a webserver, it's a TCP connection proxy.
Re:Show HN: Run SSH and HTTP(S) on the same port by pricechild on Thursday January 22, 2015 @04:40AM (#8928328)
Well, it can be a webserver if you're happy serving only a single file loaded into memory at startup: http://comments.gmane.org/gmane.comp.web.haproxy/17962
Re:Show HN: Run SSH and HTTP(S) on the same port by IgorPartola on Thursday January 22, 2015 @10:16AM (#8929535)
Pardon, an HTTP server. It talks HTTP and HTTPS, as well as raw TCP. If you define a web server as something that talks HTTP/HTTPS and also is able to serve static files off the filesystems then, not HAProxy is not that, but this is really splitting hairs.
Re:Show HN: Run SSH and HTTP(S) on the same port by jimktrains2 on Thursday January 22, 2015 @11:20AM (#8929941)
No, it's not an HTTP server. It has that capability to serve a static is almost solely for the purpose of maintenance pages and is severely limited, even to the point of needing to restart the server if you want to update the page.

It speaks HTTP in as much as it needs to to figure out how to forward requests. It doesn't generate return headers for content; it doesn't serve content; it moves streams from A to B.

Re:Show HN: Run SSH and HTTP(S) on the same port by IgorPartola on Thursday January 22, 2015 @04:08PM (#8931760)
First off, from the HAProxy docs:

> In HTTP mode, it is possible to rewrite, add or delete some of the request and response headers based on regular expressions.

Second of, it speaks HTTP, and it serves content that it is able to fetch from a content producing backend. In my book it's an HTTP server.

Third off, the difference is so pedantic that I don't think it makes any difference what we call it. We both know what it is, and what it is used for in the context of hosting web applications.

Re:Show HN: Run SSH and HTTP(S) on the same port by jimktrains2 on Friday January 23, 2015 @11:21AM (#8935615)
We don't call Varnish a web server, and it does quite a bit more with HTTP than HAProxy does.

We don't call a car a truck, even if you can haul things around it it.

Pedanticism is never a good argument against someone. 1) It's an ad hominem. 2) It doesn't actually do anything. 3) If everyone knew what it was, they wouldn't call it a web server.

Re:Show HN: Run SSH and HTTP(S) on the same port by sandGorgon on Thursday January 22, 2015 @04:12AM (#8928249)
any insights on using nginx for ssl termination vs haproxy ?
Re:Show HN: Run SSH and HTTP(S) on the same port by senko on Thursday January 22, 2015 @05:19AM (#8928416)
Nice thing about ssl termination with haproxy is that in that case, since the backend is http, it can make active http health checks. If this check determines a backend has failed, it can be taken out of rotation.

With nginx doing ssl termination, haproxy is just tcp passthrough so it only does passive health checks (ie. it can notice when the backend doesn't respond properly), but that means the current http request has failed.