Suggestions needed on Setting target host dynamically and Incoming request record-replay

Hello All,

Could you suggest ideas to achive these conditions

1) I need to decide which target service based on a KVM value.

 

 

<HTTPTargetConnection>
        <LoadBalancer>
            <MaxFailures>0</MaxFailures>
            <RetryEnabled>true</RetryEnabled>
            <Server name="WEB-INV-SVC"> <---- Need to switch servers based on KVM value
                <IsEnabled>true</IsEnabled>
                <IsFallback>false</IsFallback>
                <Weight>1</Weight>
            </Server>
            ...
        </LoadBalancer>
        <Path>/{TargetPathSuffix}</Path> <--- TargetPathSuffix set with JS
    </HTTPTargetConnection>

 

I tried setup 2 targetEndpoints with different servers and trying to set a js flag variable with which I expect to use condtional routerule. But not sure if I can use JS variable in confition. never seen one.

 

<RouteRule name="Route-WEB1">
        <Condition>(JS_variable equals "TRUE") </Condition> <---- JS_variable assigned value based on KVM value
        <TargetEndpoint>WEB1-Target</TargetEndpoint>
</RouteRule>
<RouteRule name="Route-default">
        <TargetEndpoint>WEB-Target</TargetEndpoint>
</RouteRule>

 

I know with JS we can set target URL.but this servers need to be updated often, so I'm looking for any other options.

2) Any options to record/replay incoming requests with internal/external storage? (not trace, this is not for debugging/but a failsafe option )

Please give your suggestions/feedbacks or even different approches

Thank you

Solved Solved
0 1 112
1 ACCEPTED SOLUTION

I figured it out with flow variables we can do it

I used a KVM/JS/AM poilicies for this.
get value from KVM/business login in JS/AM to assign value from JS flow variable which can be referenced in condition
-
Ganesh

View solution in original post

1 REPLY 1

I figured it out with flow variables we can do it

I used a KVM/JS/AM poilicies for this.
get value from KVM/business login in JS/AM to assign value from JS flow variable which can be referenced in condition
-
Ganesh