Hi Dave,
On 2010-07-28 23:52, Tkaczyk, Dave wrote:
> example:
> GET http://1.1.1.1/rs/msr/MSISDN/1234567
>
> my regex will get the last digit of the MSISDN (the number in the next path extent -1234567):
> 3 servers will handle digits 0-3, 4-6, 7-9 respectively.
acl to_server1 path_reg MSISDN/[0-9]+[0-3] acl to_server2 path_reg MSISDN/[0-9]+[4-6] acl to_server3 path_reg MSISDN/[0-9]+[7-9] use_backend server1 if to_server1
Depending on youa actual URL space, it could be sufficient to use this instead as the acls which would be faster as it does not involve any ACLs:
acl to_server1 path_end 0 1 2 3
...
Please check http://haproxy.1wt.eu/download/1.4/doc/configuration.txt section 7 for more details.
> My second use case is for a POST. Same last digit algorithm from above except that the MSISDN number will be buried in some XML that will be in the message body.
>
> POST http://1.1.1.1/rs/msr
>
> Body: <subscriber><field name="x">y</field><field name="MSISDN">1234562</field></subscriber>
This is currently not possible with HAproxy. It can not alter or check anything inside the HTTP body currently. You can only access inside the HTTP header section here.
--Holger Received on 2010/07/29 00:43
This archive was generated by hypermail 2.2.0 : 2010/07/29 01:00 CEST