API / APIGEE Gateway Interview Questions
What are Shared Flows in Apigee and when do you use them?
A Shared Flow is a reusable sequence of policies that can be called from any API proxy using the FlowCallout policy. Shared flows solve the problem of duplicating the same policy logic across dozens of proxies -- a change to the shared flow propagates to all proxies that reference it.
| Aspect | API Proxy | Shared Flow |
|---|---|---|
| Has a ProxyEndpoint | Yes -- receives direct client traffic | No -- cannot receive traffic directly |
| Has a TargetEndpoint | Yes | No |
| Can it be called externally | Yes (it has a URL) | No (called by FlowCallout from within a proxy) |
| Purpose | Full API lifecycle | Reusable policy bundle for cross-cutting concerns |
| Deployed to | Environment (same as proxies) | Environment (same as proxies) |
<!-- In an API proxy: calling a shared flow --> <FlowCallout name="FC.CommonSecurity"> <SharedFlowBundle>common-security</SharedFlowBundle> </FlowCallout> <!-- common-security shared flow content (sharedflowbundle/): --> <!-- VerifyAPIKey.xml --> <!-- SpikeArrest.xml --> <!-- Quota.xml --> <!-- MessageLogging.xml --> <!-- Typical shared flow use cases: - Common security (VerifyAPIKey + Quota + SpikeArrest) - Standard error handling (FaultRules + AssignMessage) - Logging (MessageLogging + StatisticsCollector) - Header injection (add internal headers before backend) - CORS handling across all proxies --> <!-- A platform team creates and governs the shared flow. Individual API teams attach it via FlowCallout. Policy change in one place = change across all proxies. -->
Governance pattern: a central platform team creates and enforces shared flows containing organisation-wide security, logging, and traffic management standards. API teams build proxies that must include the required shared flows via FlowCallout, ensuring policy consistency without manual duplication.
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...
