Quick revision
The short answer
I would first list what every custom filter does and separate business-specific behaviour from standard gateway features, then compare five-year total cost: engineers maintaining, upgrading and running the in-house gateway, plus its incidents, against licences, migration and the vendor's own operating needs. Vendor fit covers performance, customisation, data residency, lock-in and exit cost. A hybrid is often right, buying API management for external APIs and keeping a thin internal gateway, and the decision is made with a pilot against agreed criteria and revisited at contract renewal.
What to remember
In this answer, we decided between building and buying by first sorting the custom filters into standard features, integration glue and business logic, then comparing five-year total cost including people, upgrades, migration, licences and missing features. We assessed vendor fit on performance, customisation, data residency and exit cost, considered a hybrid of bought API management for external APIs and a thin internal gateway, and made the decision through a pilot with agreed criteria and a review at renewal.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would first list what every custom filter does and separate business-specific behaviour from standard gateway features, then compare five-year total cost: engineers maintaining, upgrading and running the in-house gateway, plus its incidents, against licences, migration and the vendor's own operating needs. Vendor fit covers performance, customisation, data residency, lock-in and exit cost. A hybrid is often right, buying API management for external APIs and keeping a thin internal gateway, and the decision is made with a pilot against agreed criteria and revisited at contract renewal.
Background to this question
Build versus buy decisions are rarely about technology alone. The in-house gateway works, the team knows it, and its cost is hidden in salaries; the vendor platform has a visible price and a polished demo. A senior leader is expected to make the comparison fair, over a horizon long enough to include upgrades and exit costs. In this answer, we will inventory the custom filters, build a five-year cost comparison with example numbers, assess the vendor beyond features, consider a hybrid, and finish with how to decide through a pilot and keep the decision under review.
1Start With an Inventory of the Custom Filters
The in-house gateway's value lives in its custom filters, so the first step is to list them all and ask what each one does, who depends on it, and how often it changes. Typically they fall into three groups. Standard features, such as JWT validation, rate limiting, header rewriting and request logging, are things any good API management platform does out of the box. Integration glue, such as calling an internal identity service to translate legacy tokens, is specific to us but not to the business. Business-specific logic, such as pricing checks or tenant routing rules, is what a gateway arguably should not contain at all.
This inventory changes the question. If 80 percent of the filters are standard features, buying replaces most of the code. If much of it is business logic, the first move may be to push that logic back into services, whatever we decide about the gateway.
| Group | Filters | With a vendor platform |
|---|---|---|
| Standard features | 14 | replaced by built-in policies |
| Integration glue | 6 | rewritten as vendor plugins or moved to a sidecar |
| Business-specific logic | 4 | moved into the owning services |
2Comparing Total Cost Over Five Years
Next, we compare the full cost of each path over five years, because the costs arrive at different times. For the in-house gateway, the main cost is people: say three engineers spending most of their time on the gateway, plus on-call, Spring Boot and Spring Cloud upgrades every year, security patches, and the cost of incidents the gateway caused. We also count what is missing, for example a developer portal that partners have asked for and that would take a year to build.
For the vendor, we count licences, which often scale with traffic or API calls, the migration project, training, the people still needed to configure and operate the platform, and the cost of integrating it with our identity, logging and deployment systems. A vendor platform is never zero-staff; it moves the work from writing code to configuring and governing policies. Laying both paths out by year makes the comparison honest: buying usually costs more in years one and two because of migration, and the question is whether it costs less in years three to five.
| Cost item | Keep building | Buy platform |
|---|---|---|
| Engineering on the gateway | 3 FTE x 5 years | 1 FTE for configuration and policy |
| Licences | none | grows with API calls; ask for caps |
| Migration | none | about 6 months for 2 to 3 engineers |
| Upgrades and patches | our team, every release train | vendor, but we test each upgrade |
| Missing features (portal, analytics) | build them: about 1 year of work | included |
3Assessing Vendor Fit Beyond the Feature List
A feature list does not tell us whether the platform fits. We check performance under our own traffic profile, including latency added per request at our peak rate. We check customisation: can the six integration glue filters be built as plugins, in which language, and how are they tested and deployed? We check data residency and compliance: where request data and logs are processed and stored, which matters for regulated customers.
Lock-in and exit cost need special attention over five years. If routes, policies and plugins are stored in a proprietary format, leaving means rebuilding them all. We ask whether configuration can be exported and kept in Git, whether standard formats such as OpenAPI are used for API definitions, and what the contract says about price increases at renewal. A cheap first year with a large increase in year three changes the whole comparison.
4Considering a Hybrid
The choice does not have to be all or nothing. A common pattern is to buy API management for external APIs, where a developer portal, API keys, quotas and partner analytics matter most and where traffic is usually lower, and to keep a thin internal gateway on Spring Cloud Gateway for internal and first-party traffic, where volume is high, per-request licences would be expensive and Spring integration is valuable.
The hybrid only works if the internal gateway actually becomes thin: standard filters, few custom ones, business logic moved into services. Otherwise we pay for a platform and still carry the full maintenance burden of the old one.
- Partners and public clientsexternal API consumers
- Vendor API managementportal, API keys, quotas, partner analytics
- First-party appsweb and mobile, high volume
- Thin Spring Cloud Gatewayrouting, token validation, rate limits
- Servicesbusiness rules and data authorization
5 layers, from the top down. Step through them one at a time.
External traffic gets bought features; internal traffic keeps a cheap, controllable gateway.
5Deciding With a Pilot and Revisiting at Renewal
A demo shows the vendor's best case; a pilot shows ours. We agree the success criteria before it starts, with the platform team, security and two or three product teams: for example, added latency under 10 milliseconds at p99 at our peak rate, our three hardest integration filters rebuilt as plugins, configuration kept in Git and deployed through our pipeline, and logs flowing to our observability stack. We run it on a few real APIs for six to eight weeks and score the result against the criteria.
Then we decide, write down why, and put a review in the calendar for the contract renewal date. At renewal we rerun the cost comparison with real numbers: what did we spend, what did the vendor deliver, and what would exit cost now? That keeps a five-year decision from becoming a five-year assumption.
6Follow-up questions
What if the gateway team fears losing their work?
Address it openly. Their knowledge of our traffic, security and integrations is exactly what a migration and the remaining platform need. Many of them will own the vendor configuration, the thin internal gateway, or the plugin work. A decision that ignores the team's concerns will be slowed down by them.
How do you avoid being trapped by the vendor?
Keep API definitions in OpenAPI, keep policies and routes in Git where the platform allows it, keep business logic out of vendor plugins, and negotiate exit terms, including data export and price caps, before signing. Estimate the exit cost once a year.
What if the pilot results are mixed?
Look at which criteria failed. If the hard filters cannot be built as plugins, a hybrid may still work for external APIs. If performance fails at our traffic, buying is probably wrong for internal traffic. Mixed results usually point to a narrower purchase, not to all or nothing.
7Conclusion
In this answer, we decided between building and buying by first sorting the custom filters into standard features, integration glue and business logic, then comparing five-year total cost including people, upgrades, migration, licences and missing features. We assessed vendor fit on performance, customisation, data residency and exit cost, considered a hybrid of bought API management for external APIs and a thin internal gateway, and made the decision through a pilot with agreed criteria and a review at renewal.
Open with
I would start with an inventory of the custom filters, because that is where the in-house gateway's value is. I would sort them into standard features like token validation and rate limiting, integration glue specific to our systems, and business logic that should move into services anyway.
Then, if they want more
That tells me how much a vendor platform really replaces. Then I would build a five-year total cost comparison. For building: the engineers maintaining the gateway, upgrades every release train, security patches, on-call and incidents, plus features we lack, like a developer portal.
For buying: licences, which often grow with traffic, the migration project, training, the people still needed to configure the platform, and integration with our identity and observability. Buying usually costs more in the first two years, so the question is years three to five.
Beyond features, I would assess fit: added latency at our peak, whether our integration filters can be built as plugins, data residency, and lock-in, meaning whether config can live in Git and what exit and renewal terms look like.
Often a hybrid makes sense: buy API management for external partner APIs, keep a thin Spring Cloud Gateway for high-volume internal traffic. I would decide through a six to eight week pilot on real APIs with criteria agreed in advance, document the reasoning, and revisit the decision with real numbers at contract renewal.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Cloud documentation, Resilience4j documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Your API edge is built in-house on Spring Cloud Gateway with many custom filters. A...": https://scrivio-interview-library.netlify.app/spring-boot/spring-cloud/59af71ad96/