I just tried out this scenario and this is what I observed. When you make the 'Production URL' unavailable, it would direct the other request to the next endpoint. So as far as I see, the functionality is working. The dynamic failover functionality also works fine. I'm attaching the API configuration that I used for this scenario. Could you kindly cross check your synapse config with mine and see whether there are any differences? Also, note that I'm using 3 App server nodes as the backends.
Regards, Evanthika Amarasiri Senior Technical Lead - Quality Assurance Mobile: +94773125935 Blog: evanthika.blogspot.com wso2.com lean.enterprise.middleware On Wed, Jul 8, 2015 at 2:03 PM, Lasitha Deergawansa <[email protected]> wrote: > Hi All, > > I'm in process of automating Failover end point function test case - > APIM-45 [1] and figured out the Failover Endpoint function is not working > in APIM 1.9.0. This is a blocker for the completion of the test case. > Tracking purpose I have created a JIRA APIMANAGER-3967 [2] > > Steps to recreate: > 1. Create, Publish and Subscribe a API with "Endpoint Type=Failover > Endpoint" with a production endpoint and multiple production failover > endpoints. > 2. Send a request to the API and it will correctly invoked the production > end point. > 3. Make the production end point unavailable and send the request again > 4. No response from the API. > > > > > [1] > https://testlink.wso2.com/linkto.php?tprojectPrefix=APIM&item=testcase&id=APIM-45 > [2] https://wso2.org/jira/browse/APIMANAGER-3967 > > > > Thanks & Best Regards, > Lasitha. >
<?xml version="1.0" encoding="UTF-8"?> <api xmlns="http://ws.apache.org/ns/synapse" name="admin190beta--Admin190API1" context="/1.0.0/admin/api1" version="1.0.0" version-type="context"> <resource methods="DELETE HEAD GET" uri-template="/customerservice/customers/{id}" faultSequence="fault"> <inSequence> <filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION"> <then> <property name="api.ut.backendRequestTime" expression="get-property('SYSTEM_TIME')"/> <send> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_0"> <failover> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_0_0"> <http uri-template="http://172.20.10.2:9764/jaxrs_basic/services/customers"/> </endpoint> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_0_1"> <http uri-template="http://172.20.10.2:9765/jaxrs_basic/services/customers"/> </endpoint> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_0_2"> <http uri-template="http://172.20.10.2:9766/jaxrs_basic/services/customers"/> </endpoint> </failover> </endpoint> </send> </then> <else> <sequence key="_sandbox_key_error_"/> </else> </filter> </inSequence> <outSequence> <class name="org.wso2.carbon.apimgt.usage.publisher.APIMgtResponseHandler"/> <send/> </outSequence> </resource> <resource methods="POST PUT" url-mapping="/customerservice/customers" faultSequence="fault"> <inSequence> <filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION"> <then> <property name="api.ut.backendRequestTime" expression="get-property('SYSTEM_TIME')"/> <send> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_1"> <failover> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_1_0"> <http uri-template="http://172.20.10.2:9764/jaxrs_basic/services/customers"/> </endpoint> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_1_1"> <http uri-template="http://172.20.10.2:9765/jaxrs_basic/services/customers"/> </endpoint> <endpoint name="admin190beta--Admin190API1_APIproductionEndpoint_1_2"> <http uri-template="http://172.20.10.2:9766/jaxrs_basic/services/customers"/> </endpoint> </failover> </endpoint> </send> </then> <else> <sequence key="_sandbox_key_error_"/> </else> </filter> </inSequence> <outSequence> <class name="org.wso2.carbon.apimgt.usage.publisher.APIMgtResponseHandler"/> <send/> </outSequence> </resource> <handlers> <handler class="org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler"> <property name="inline" value="ENDPOINT"/> </handler> <handler class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/> <handler class="org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler"> <property name="id" value="A"/> <property name="policyKey" value="gov:/apimgt/applicationdata/tiers.xml"/> </handler> <handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler"/> <handler class="org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler"> <property name="configKey" value="gov:/apimgt/statistics/ga-config.xml"/> </handler> <handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/> </handlers> </api>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
