Free Google Apigee-API-Engineer Actual Exam Questions - Question 10 Discussion
C, because route rules can dynamically adjust backends without redefining endpoints.
Actually, D makes more sense here because TargetServer lets you define backend targets separately from the endpoint configuration and then reference them, which simplifies managing multiple environments. You can create different TargetServers for dev, test, prod, etc., and just switch references. That way, your endpoint config stays clean, and you avoid duplicating settings. It’s especially handy if the backends share similar URLs but differ by environment names or domains. So, while B is about the overall endpoint, D handles backend targets specifically for each environment in a modular way.
C imo, RouteRules are great for routing traffic dynamically based on environment variables or conditions, which helps when you want to switch backends without duplicating endpoints. Makes it flexible.
It’s B for me. TargetEndpoint configs are designed to be environment-specific, so you can just set different backend URLs in each without extra layers. Unlike TargetServer, which is more about grouping servers, TargetEndpoint lets you isolate environment settings cleanly. Plus, callouts (A) seem overkill for simple backend switching. RouteRules (C) are more about routing based on request conditions rather than setting up distinct backends per environment. So, B feels like the straightforward and recommended approach here.
D imo, TargetServer lets you set up backend servers separately and swap them per environment easily, unlike RouteRules which are more for traffic direction. Keeps the main target cleaner.
Option B makes sense since TargetEndpoint configurations can be duplicated per environment with different backend URLs, keeping things organized without complicating routing rules or requiring extra callouts.
Maybe D is better because TargetServer allows defining different backend servers for each environment without changing the main target endpoint setup. That seems cleaner than messing with RouteRules for this purpose.
Guessing C here since RouteRules usually help direct traffic based on conditions like environment, right? Not 100% sure though.