Forum Discussion

gscholz's avatar
gscholz
Icon for Nimbostratus rankNimbostratus
Nov 15, 2019

URL branching in Per-Request policy by checking datagroups

I have a virtual server where user traffic has to get forwarded to different pools depending on the URI they are trying to access. There are also various flavours of authentication involved. Therefore I am trying to implement it on v15.0.0 with per-request policies. [1]

In a slightly simpler environment with only six different URIs we started off with URL branching and defined one pool per branch.

 

So it would look like this:

domain1/uri1 -> url branching -> matches branch rule 1 -> goes to pool_1

domain1/uri2 -> url branching -> matches branch rule 2 --> goes to pool_2

domain2/uri3 -> url branching -> matches branch rule 3 -> goes to pool_3

domain2/uri4-> url branching -> matches branch rule 4 -> goes to pool_4

 

Now we have a lot more URIs which I have already entered into datagroups depending on which pool the traffic is supposed to get directed to. I would like to achieve something like this:

domain/uri1 -> url branching loops through defined datagroups -> matches datagroup 1 -> goes to pool_1

domain/uri2 -> url branching loops through defined datagroups -> matches datagroup 1 -> goes to pool_1

domain/uri3 -> url branching loops through defined datagroups -> matches datagroup 5 -> goes to pool_5

 

Is there any way to achieve this? I had a look at URL branching and iRule Events, but didn't see anything that would help me.

 

Might it be possible to run through an iRule that checks the URI against all defined datagroups and returns a specific value to the access policy that specifies which branch to take?

 

[1] My first approach was VIP-targeting-VIP where traffic gets sent to different virtual servers with associated access policies via an LTM policy, but that doesn't work when filtering on URIs, because users get redirected to /my.policy regardless of the sub-server they hit, so then they have to go through the LTM policy again, and /my.policy doesn't match the defined URIs that would direct them to the correct sub-server and its associated access policy.

No RepliesBe the first to reply