Many thanks Jarno,
I'll start from here.
--
Egor
Hello,
On Fri, Feb 24, Egor A wrote:
I'm looking for a way to route incoming POST requests to a
particular backends based on SOAP envelope content.
Particular case:
Route incoming DeleteRequest based on Id element regex pattern match
(like ^1000.*).
Haproxy version - 1.5.19
<soapenv:Body>
<typ:AddRequest>
<typ:Id>1000000111</typ:Id>
</typ:AddRequest>
</soapenv:Body>
Look like ACL can inspect req.body as a binary content, so it should
be possible to some grade.
I think req.body / option http-buffer-request are not in haproxy 1.5
AFAIK they're in >= 1.6
(http://blog.haproxy.com/2015/10/14/whats-new-in-haproxy-1-6/)
Is there any way to make haproxy SOAP-aware?
Maybe with lua ?
https://touk.pl/blog/2016/03/22/haproxy-sticky-sessions-for-soap-payloads/
I'd appreciate if you share some example because it' not
straightforward for me.
This is from top of my head so probaly won't work as is:
option http-buffer-request
use_backend/etc. if { req.body -m reg "<typ:Id>1000.*</typ:Id> }
I'd also use some kind of acl(path etc.) so req.body matching happens only
for requests that need it.
-Jarno