Dynamically route to target endpoints using target.url

Not applicable

Hello All,

This is continuation of question https://community.apigee.com/questions/31061/dynamically-route-to-target-endpoints-using-javasc.html

In my case, we have loadbalancer in target server as below.

However if use target.url for few cases then will targte.url override loadbalancer server?

<HTTPTargetConnection>
        <LoadBalancer>
            <Server name="BIZX-API-LB-INT"/>
        </LoadBalancer>
        <Path>/</Path>
        <Properties>
            <Property name="use.proxy">false</Property>

@Dino @Anil Sagar Could you also check here.

Solved Solved
0 1 874
1 ACCEPTED SOLUTION

No. It's my understanding that setting target.url works if and only if you are not using a named TargetServer.

Why would you do that, though? What's your real goal here? Are you looking to load-balance across a set of backends? I think the decision table is like this:

number of backendsbackend url is dynamic recommended approach
1Nouse target with a fixed url
variesYesset target.url in the Target flow
>1Nouse target servers
>1Yesuse Javascript to dynamically select and set target.url according to the algorithm you require.

View solution in original post

1 REPLY 1

No. It's my understanding that setting target.url works if and only if you are not using a named TargetServer.

Why would you do that, though? What's your real goal here? Are you looking to load-balance across a set of backends? I think the decision table is like this:

number of backendsbackend url is dynamic recommended approach
1Nouse target with a fixed url
variesYesset target.url in the Target flow
>1Nouse target servers
>1Yesuse Javascript to dynamically select and set target.url according to the algorithm you require.