Learn the best practice for routing API traffic in Apigee across multiple regions. Discover how to use TargetServers and flow variables for efficient regional backend selection.
Table of Contents
Question
You recently deployed an Apigee API proxy to your organization across two regions. Both regions are configured with a separate backend that is hosting the API. You need to configure Apigee to route traffic to the appropriate local region backend. What should you do?
A. Create a TargetEndpoint with a weighted load balancing algorithm. Configure the API proxy to use the same weights for each region’s backend.
B. Configure a regional internal Application Load Balancer in each region, and use health checks to verify that each backend is active. Create a DNS A record that contains the IP addresses of both regions’ load balancers. Configure a Targetserver for each region that uses this DNS name.
C. Configure a global external Application Load Balancer and configure each region’s backend with a different regional backend service. Each region communicates to this single global external Application Load Balancer as its TargetServer.
D. Configure a TargetServer for each region’s backend host names. Configure the API proxy to choose the TargetServer based on the system.region.name flow variable.
Answer
D. Configure a TargetServer for each region’s backend host names. Configure the API proxy to choose the TargetServer based on the system.region.name flow variable.
Explanation
This solution is ideal for routing traffic to the appropriate local region backend in a multi-region Apigee deployment for several reasons:
- Region-specific TargetServers: By configuring a TargetServer for each region’s backend, you create a logical separation between different regional endpoints. This allows for better management and flexibility in handling region-specific configurations.
- Use of system.region.name variable: The system.region.name flow variable in Apigee automatically provides information about the region where the API proxy is currently executing. By using this variable to select the appropriate TargetServer, you ensure that traffic is routed to the geographically closest or most appropriate backend.
- Efficient routing: This approach allows for direct communication between the Apigee instance in a specific region and its corresponding backend, minimizing latency and improving performance.
- Scalability: As you add more regions, you can easily extend this configuration by adding new TargetServers and including them in the routing logic.
- Simplicity: This solution doesn’t require complex load balancing configurations or additional infrastructure components, making it easier to implement and maintain.
- Resilience: If one region’s backend becomes unavailable, traffic from that region can be easily rerouted to another region’s backend by adjusting the TargetServer selection logic.
This approach aligns with Apigee’s design principles for multi-region deployments and provides an efficient, scalable, and manageable solution for routing API traffic to the appropriate regional backend.
Google Professional Cloud Developer certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Google Professional Cloud Developer exam and earn Google Professional Cloud Developer certification.