I need help to find out the issue in configuring the fallback settings. Consider the below target end point settings with the fall back target server.

Not applicable

I need help to find out the issue in configuring the fallback settings. Consider the below target end point settings with the fall back target server.

<HTTPTargetConnection>

<LoadBalancer>

<Server name="pp2url"/>

<Server name="callback1url">

<IsFallback>true</IsFallback>

</Server>

</LoadBalancer>

<Path>/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_Sender&receiverParty=&receiverService=&interface=SI_OS_Request_StoredProcedure&interfaceNamespace=http://lsco.com/rtc/API_StoredProcedure_POC</Path>

</HTTPTargetConnection>

The target is the soap based webservice and requires authentication.

Issue:

If the pp2url is not found or having issue, the apigee is invoking the callback1url - but giving error. Whereas if I used the callback1url in the place of pp2url, the flow returns success response. Can you please help us resolving this issue?

Solved Solved
0 6 612
1 ACCEPTED SOLUTION

Not applicable

Hi @Paranitharan , 404 cannot be called as target unavailable by Load balancer and thats the reason why in your case , re-routing is not happening to fallback server .

Using health monitor you can one way handle all Http 4xx and 5xx too . Based on the error scenarios what you want to handle , you can design your target definition

pls check this link http://apigee.com/docs/api-services/content/load-balancing-across-backend-servers

View solution in original post

6 REPLIES 6

Not applicable

Hi Paranitharan ,

Can you share the errors that you are seeing when the request is being sent to fallback server ?

I have the fallback option working as expected in my environment . Can you try the below things ?

1)Enable IsEnabled flag and check ?

By default its true though but thats the only difference I could see .

<Servername="callback1url">

<IsEnabled>true</IsEnabled>

<IsFallback>true</IsFallback>

</Server>

2)Confirm the behaviour when you interchange the servers (add pp2url as fallback) .

Not applicable

Configuration: <LoadBalancer> <Server name="pp2url"/> <Server name="callback1url"> <IsFallback>true</IsFallback> <IsEnabled>true</IsEnabled> </Server> </LoadBalancer> and <LoadBalancer> <Server name="pp2url"/> </LoadBalancer> For the above both configuration, the Response is same as below. As pp2url has the invalid url. Below are the response Response code: 404 Not Found Response content body: <?xml version="1.0" encoding="UTF-8"?> <Error> <reason>Requested Domain b2b-aa.xxxx.com not registered</reason> </Error> If I swap the urls as follows in the configuration <LoadBalancer> <Server name="callback1url"/> <Server name="pp2url"> <IsFallback>true</IsFallback> <IsEnabled>true</IsEnabled> </Server> I am getting the 200 OK response.

Not applicable
Configuration:
        <LoadBalancer>
            <Server name="pp2url"/>
            <Server name="callback1url">
                <IsFallback>true</IsFallback>
              <IsEnabled>true</IsEnabled>
            </Server>

        </LoadBalancer>
and

        <LoadBalancer>
            <Server name="pp2url"/>
        </LoadBalancer>

For the above both configurations, the Response is same as below.  As pp2url has the invalid url.  Below are the response
Response code: 
404 Not Found 

Response content body:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
                <reason>Requested Domain b2b-aa.xxxx.com not registered</reason>
            </Error>


If I swap the urls as follows
      <LoadBalancer>
            <Server name="callback1url"/>
            <Server name="pp2url">
                <IsFallback>true</IsFallback>
              <IsEnabled>true</IsEnabled>
            </Server>

I am getting the 200 OK response.

Not applicable

I thought you said the fallback call was being executed but looks like the fallback is not getting executed at all in your case as the call to pp2url is returning 404 from the target server .

Loadbalancer can only fallback if the target endpoint is unavailable or incase of any io errors. Just for testing you can try pp2url as http://lscop.com and see if fallback works or not .

Not applicable

It is called the fall back server if I use the http://lscop.com. Thanks.

However, I understood, apigee supports one level of fallback (if pp2url fails, callback1url will be called). I have a requirement which need one more level fall back (if callback1url fails, then callback2url need to be called). Can you please let me know, can I achieve this using the target server settings. As of now, I am using a Callout service policy in case of failure response. But this target server configuration seems to be faster comparing the Callout service policy.

Not applicable

Hi @Paranitharan , 404 cannot be called as target unavailable by Load balancer and thats the reason why in your case , re-routing is not happening to fallback server .

Using health monitor you can one way handle all Http 4xx and 5xx too . Based on the error scenarios what you want to handle , you can design your target definition

pls check this link http://apigee.com/docs/api-services/content/load-balancing-across-backend-servers