Hi Aleks, On Wed, Jan 16, 2019 at 11:52:12PM +0100, Aleksandar Lazic wrote: > For service routing are the standard haproxy content routing options possible > (path, header, ...) , right?
Yes absolutely. > If someone want to route based on grpc content he can use lua with body > content > right? > > For example this library https://github.com/Neopallium/lua-pb Very likely, yes. If you want to inspect the body you simply have to enable "option http-buffer-request" so that haproxy waits for the body before executing rules. From there, indeed you can pass whatever Lua code on req.body. I don't know if there would be any value in trying to implement some protobuf converters to decode certain things natively. What I don't know is if the contents can be deserialized even without compiling the proto files. > > That's about all. With each major release we feel like version dot-2 > > works pretty well. This one is no exception. We'll see in 6 months if > > it was wise :-) > > So you would say I can use it in production with htx ;-) As long as you're still a bit careful, yes, definitely. haproxy.org has been running it in production since 1.9-dev9 or so. Since 1.9.0 was released, we've had one crash a few times (fixed in 1.9.1) and two massive slowdowns due to non-expiring connections reaching the frontend's maxconn limit (fixed in 1.9.2). > and the docker image is also updated ;-) > > https://hub.docker.com/r/me2digital/haproxy19 Thanks. > As we have now a separated protocol handling layer (htx) how difficult is it > to > add `mode fast-cgi` like `mode http`? We'd like to have this for 2.0. But it wouldn't be "mode fast-cgi" but rather "proto fast-cgi" on the server lines to replace the htx-to-h1 mux with an htx-to-fcgi one, because fast-cgi is another representation of HTTP. The "mode http" setting is what enables all HTTP processing (http-request rules, cookie parsing etc). Thus you definitely want to have it enabled. > I ask because php have not a production ready http implementation but a robust > fast cgi process manager (php-fpm). There are several possible solution to add > http to php (nginx+php-fpm, uwsgi+php-fpm, uwsgi+embeded php) but all this > solutions requires a additional hop. > > My wish is to have such a flow. > > haproxy -> *.php => php-fpm > -> *.static-files => nginx,h2o It's *exactly* what I've been wanting for a long time as well. Mind you that Thierry implemented some experimental fast-cgi code many years ago in 1.3! By then we were facing some strong architectural limitations, but now I think we should have everything ready thanks to the muxes. > I have take a look into fcgi protocol but sadly I'm not a good enough > programmer > for that task. I can offer the tests for the implementation. That's good to know, thanks! Cheers, Willy

