Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ApigeeX cross region failover setting in TargetEndpoints

We are using the system.region.name variable to identify the region in which the GCLB sent the traffic to our MIGs /Apigeex runtime. Using hat, we are handling the traffic in same region till the backen.

Recently when we had an issue with one region backend (POD restart), the ApigeeX runtime was not able to move the traffic to other region. Apigee was throwing 503 service unavailable errors that was passed from backend L4 ILB/ GKE cluster since we have IsFallback option which doesnt care about HTTP response code.

Does below config with HealthMonitor help on this case?

 

<TargetEndpoint name="central">
  <Description/>
  <FaultRules/>
  <PreFlow name="PreFlow">
    <Request/>
    <Response/>
  </PreFlow>
  <PostFlow name="PostFlow">
    <Request/>
    <Response/>
  </PostFlow>
  <Flows/>
  <HTTPTargetConnection>
    <LoadBalancer>
      <Algorithm>RoundRobin</Algorithm>
      <Server name="central"/>
      <Server name="east">
        <IsFallback>true</IsFallback>
      </Server>
    </LoadBalancer>
    <HealthMonitor>
      <IsEnabled>true</IsEnabled>
      <IntervalInSec>5</IntervalInSec>
      <HTTPMonitor>
        <Request>
          <ConnectTimeoutInSec>10</ConnectTimeoutInSec>
          <SocketReadTimeoutInSec>30</SocketReadTimeoutInSec>
          <Port>443</Port>
          <Verb>GET</Verb>
          <Path>/health</Path>
        </Request>
        <SuccessResponse>
          <ResponseCode>200</ResponseCode>
        </SuccessResponse>
      </HTTPMonitor>
    </HealthMonitor>
  </HTTPTargetConnection>
</TargetEndpoint>

 

 

above is for one region & similar config will be available for 2nd region with fallback of primary region.

Also does any log in apigeex show that it did a fallback?

0 7 496
7 REPLIES 7