On Mon, Aug 25, 2014 at 1:56 PM, Lukas Tribus <[email protected]> wrote:
> Hi Ludovic, > > > > Hi, > > > > Before 1.5 release of HAProxy, I used Nginx for SSL and serve static > files. > > But now, I use only Nginx to serve static files, because I've better > > performances with HAProxy for SSL. > > > > I know that HAProxy is only to proxy queries, but I've tried to server > > a static file with HAProxy with monitor-uri and errorfile in my config > > file: > > > > listen http-webservices > > bind :8080 > > monitor-uri /c > > errorfile 200 /etc/haproxy/errorfiles/200.http > > > > It works pretty well, better performances than Nginx with cache enabled > > (based on my benchmarks with Weighttp). > > Thats because the errorfile is read at startup and kept in memory. If you > replace or update that file, HAProxy will still serve the old file it has > in memory. > > You cannot compare this with regular file serving as nginx does it. > > > I'm sure nginx performance is similar when you serve content as errorfile > from memory. > Thank for the remark, but I already now this fact, it's because of that I've enabled cache in Nginx. > > But, it isn't really useable, I can only serve one static file by > > frontend/listen. > > > > With 1.5 release, HAProxy is now capable to replace a Web server in > > most cases, I've connected HAProxy directly with my Python daemons. > > If python daemons include a http server, sure. But that doesn't mean > HAproxy is the webserver, it means that Python is the webserver. > Except with apache mod_python, almost solutions to make Web apps with Python is to use a WSGI server+reverse proxy, usually Gunicorn+Nginx. I've replaced Nginx by HAProxy. I don't understand your remark. > > > > > Any plans to support static files ? > > I know that HAProxy wasn't designed for that, but I've the feeling that > > HAProxy could do that better than others Web servers. > > I don't really agree, but this is not the first request for local file > system access, as mentioned by Willy in the Roadmap for 1.6 thread: > http://marc.info/?l=haproxy&m=140630935820775&w=1 Thank you for the link.

