Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4740

HAProxy ACL's - Support of Arithmetical Operations

$
0
0

I am trying to implement a logic as below to route the requests across different backends depending on if some part of the URL is “odd” or “even” number. The logic is described as below:

  • Parse the URL and find the Id.
  • If Id even number (id%2 == 0) then route the request to “backendX”. Else route to “backendY”.

Sample URI: http://api.example.com/devices/demo-devices/{id}

Is it possible to implement such a logic as explained above using the ACL’s?

If yes - is it supported as part of the community version?
If no - are there are any alternate approaches?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>