Issue observed on OPDK 4.18.05
If you have a <Path/> element in the target endpoint, the target host is appended with
/%0A%20%20%20%20/
This is what I see in the trace -
Request sent to Target "https://****.dev.apps.pcf.nonprod.****.com/%0A%20%20%20%20/api/v1/loan/0000000000628/borrowers/54871" Is this a known issue or a bug?
The issue is resolved if you delete the <Path> tag
Attaching the trace as well
This is the target endpoint configuration
<HTTPTargetConnection> <LoadBalancer> <MaxFailures>0</MaxFailures> <RetryEnabled>true</RetryEnabled> <Server name="PCF_MLOSApi_Target_Dev4"> <IsEnabled>true</IsEnabled> <IsFallback>false</IsFallback> <Weight>1</Weight> </Server> <TargetDisableSecs>300</TargetDisableSecs> </LoadBalancer> <Path/>…..
I tried the same config on 4.18.05 OPDK instance and I don't see the issue.
<HTTPTargetConnection> <Properties/> <LoadBalancer> <MaxFailures>0</MaxFailures> <RetryEnabled>true</RetryEnabled> <Server name="httpbin"> <IsEnabled>true</IsEnabled> <IsFallback>false</IsFallback> <Weight>1</Weight> </Server> <TargetDisableSecs>300</TargetDisableSecs> </LoadBalancer> <Path/> <SSLInfo> <Enabled>true</Enabled> </SSLInfo> </HTTPTargetConnection>
BTW what is the use of <TargetDisableSecs>300</TargetDisableSecs> ? I couldnt find info on it.
@Siddharth Barahalikar TargetDisableSecs - TargetDisableSecs default value is 300 secs.
Lets say we have below configuration: <TargetEndpoint name="default">
<HTTPTargetConnection>
<LoadBalancer>
<Algorithm>RoundRobin</Algorithm>
<Server name="A" />
<Server name="B" />
<Server name="C">
<MaxFailures>3</MaxFailures>
<RetryEnabled>true</RetryEnabled>
<TargetDisableSecs>20</TargetDisableSecs>
<IsFallback>true</IsFallback>
</Server>
</LoadBalancer>
<Path>/test</Path>
</HTTPTargetConnection>
</TargetEndpoint> Now here lets assume target server C fails after 3 attempts, at this point of time it would be disabled and no more requests will be sent to C. Now in this scenario, if we have <RetryEnabled> like we see, the target server C would be retried for request after 20 secs ( TargetDisableSecs ) If we don't specify TargetDisableSecs then it would retry after default value of 300 secs. Also if, <RetryEnabled> is set to false, it won't retry the target server C again.Please note <RetryEnabled> is set to true by default. https://docs.apigee.com/api-platform/deploy/load-balancing-across-backend-servers#settingloadbalance.... There is not any default value for MaxFailures.
Hi, did you know what is this for? What is the disadvantage in increasing the value of it?
<TargetDisableSecs>300</TargetDisableSecs>
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |