APIGEE-API-ENGINEER practice question 10 of 25
Which is the recommended solution lo specify a different backend target for each environment?
Full set: 126 questionsThe recommended solution is to use a TargetServer configuration. TargetServers are environment-scoped objects in Apigee that decouple the concrete backend endpoint URLs from the API proxy's TargetEndpoint definition. You can define a TargetServer with the same name (e.g., 'backend-service') in each environment (dev, test, prod), but with a different host/IP address for each. The API proxy then references this named TargetServer. When the proxy is deployed to an environment, it resolves to the backend configured for that specific environment, allowing the same proxy bundle to be promoted without modification.
A. Java/JavaScript/Python callout: This is not recommended as it adds unnecessary code complexity and mixes configuration with runtime logic, making the proxy harder to maintain.
B. TargetEndpoint configuration: Hardcoding a URL directly in the TargetEndpoint is bad practice because it requires changing the proxy bundle for each environment.
C. RouteRules: RouteRules are used for conditional routing based on request characteristics (e.g., path, headers), not for managing environment-specific backend endpoints.
1. Google Cloud Apigee Documentation, "Load balancing across backend servers": This document explicitly states, "A TargetServer decouples concrete endpoint URLs from TargetEndpoint configurations. Instead of defining a concrete URL in your configuration, you can configure one or more named TargetServers... The TargetServer definition itself is stored in the environment..." This directly supports using TargetServer for environment-specific backends.
2. Google Cloud Apigee Documentation, "TargetEndpoint configuration reference": Under the element section, the documentation shows how to use to reference a TargetServer by name (), which is the mechanism for implementing this pattern. It contrasts this with using a direct .
3. Google Cloud Apigee Documentation, "About environments and environment groups": This document clarifies that an environment is a "runtime execution context for the API proxies" and that certain configurations, like TargetServers and Key Value Maps (KVMs), are scoped to these environments. This reinforces that TargetServer is the correct construct for environment-specific configurations.
Keep practicing
Take the free APIGEE-API-ENGINEER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other APIGEE-API-ENGINEER practice questions
- Question 1In your last release, there were unexpected errors uncovered by users within the first 24…
- Question 2Your company runs their internal services across two datacenters in a hot-warm configurat…
- Question 3Which features are supported in the OAulhV2 policy'? Select all that are correct. Choose …
- Question 4Which is a benefit of three-legged OAuth (authonzation_code grant)'?
- Question 5Which Apigee product feature can be used to host and version your API documentation'?
- Question 6As an API Engineer your team would like to make sure you are simulating a user experience…
