API / APIGEE Gateway Interview Questions
What is Target Server configuration in Apigee and why is it used instead of hardcoding backend URLs?
A Target Server is a named, environment-scoped configuration object that defines a backend service endpoint (host, port, SSL settings). Instead of hardcoding the backend URL in the proxy's TargetEndpoint XML, you reference a Target Server by name. This allows the same proxy to point to different backends in different environments (dev vs prod) and enables seamless backend updates without proxy redeployment.
<!-- TargetEndpoint using a TargetServer (recommended) --> <TargetEndpoint name="default"> <HTTPTargetConnection> <LoadBalancer> <!-- Reference a named Target Server instead of hardcoded URL --> <Server name="orders-backend-server"/> </LoadBalancer> <Path>/api/v1</Path> </HTTPTargetConnection> </TargetEndpoint> <!-- Target Server definition (set in Apigee UI/API per environment) --> <!-- Environment: prod --> { "name": "orders-backend-server", "host": "orders.prod.internal.example.com", "port": 443, "sSLInfo": { "enabled": true, "clientAuthEnabled": false }, "isEnabled": true } <!-- Environment: dev --> { "name": "orders-backend-server", "host": "orders.dev.internal.example.com", "port": 8080, "sSLInfo": { "enabled": false } } <!-- Load balancing across multiple target servers --> <LoadBalancer> <Algorithm>RoundRobin</Algorithm> <Server name="orders-backend-1"/> <Server name="orders-backend-2"/> <Server name="orders-backend-3"/> </LoadBalancer>
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
