Quick revision
The short answer
I would decide from requirements, not preference: list the edge features we need, such as routing, authentication, rate limiting, TLS, observability and a developer portal, then compare Spring Cloud Gateway, which gives Java-level customisation and Spring integration but which we operate and scale ourselves, with a managed gateway, which reduces operations but limits customisation and adds per-request cost. Zuul 1 is no longer supported in Spring Cloud, so it has to be replaced in any case. Whatever we choose, we migrate route by route with traffic mirroring or canaries and a clear rollback.
What to remember
In this answer, we chose an edge standard by starting from the required features and the behaviour of today's custom filters, compared Spring Cloud Gateway's control with a managed gateway's lower operations and an ingress controller's simplicity, and decided with weighted criteria and real cost estimates. We replaced Zuul first, since it is no longer supported, and migrated route by route with mirroring, canary percentages and a fast rollback.
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 decide from requirements, not preference: list the edge features we need, such as routing, authentication, rate limiting, TLS, observability and a developer portal, then compare Spring Cloud Gateway, which gives Java-level customisation and Spring integration but which we operate and scale ourselves, with a managed gateway, which reduces operations but limits customisation and adds per-request cost. Zuul 1 is no longer supported in Spring Cloud, so it has to be replaced in any case. Whatever we choose, we migrate route by route with traffic mirroring or canaries and a clear rollback.
Why this question is asked
Three edge technologies for 100 services means three ways to configure routes, three security setups and three places to look during an incident. Consolidating is clearly worth it; the hard part is choosing the target and moving without an outage. Interviewers ask this to see whether we can run a technology decision with criteria and then plan a safe migration. In this answer, we will list the requirements, look at what each option is good at, decide with a scorecard, and then plan the migration route by route, starting with the Zuul routes because they cannot stay.
1Start From the Required Edge Features
Before comparing products, we write down what the edge must do for our 100 services. The usual list is routing by path and host, TLS termination and certificates, authentication by token validation, rate limiting and quotas per client, observability (metrics, logs and traces with a correlation id), and, if we publish APIs to partners, a developer portal with API keys and documentation. We add non-functional needs: expected peak traffic, latency budget, availability target, and compliance rules such as where data may be processed.
We also inventory what the current gateways actually do. The old Zuul gateway probably has custom filters for things like header rewriting or legacy authentication. Each custom behaviour must either be supported by the target or moved somewhere else, so this list drives the decision as much as the feature list does.
2What Each Option Is Good At
Spring Cloud Gateway gives us full control in Java. Custom filters are ordinary Spring code, it integrates with Spring Security, Micrometer and service discovery, and our Java teams can read and change it. The cost is that we run it: capacity planning, scaling, upgrades, security patches and on-call. It has no developer portal of its own.
A managed cloud API gateway is operated by the provider: scaling, availability and patching are handled for us, and it usually includes API keys, quotas and a portal. The trade-offs are less freedom for custom logic, limits on request sizes and timeouts, a per-request price that grows with traffic, and ties to one cloud. NGINX or another Kubernetes ingress controller is excellent at plain routing and TLS inside the cluster and is cheap to run, but complex authentication or custom logic is harder there.
Zuul 1 is not a real option. Spring Cloud Netflix's Zuul support was removed in the 2020.0 release train, so it receives no updates from the Spring Cloud side, and keeping it means staying on old Spring versions with growing security risk. It must be replaced whatever we decide about the target.
| Need | Spring Cloud Gateway | Managed gateway | NGINX ingress |
|---|---|---|---|
| Custom logic | full, in Java | limited, plugins or scripts | limited, config and Lua |
| Operations | we run and scale it | provider runs it | we run it, simple |
| Cost at high traffic | compute only | per request, grows | compute only |
| Developer portal, API keys | not included | usually included | not included |
| Portability across clouds | high | low | high |
3Deciding With a Scorecard
We weight the criteria with the people who live with the result: the platform team, security, and a few service teams. For example, if 90 percent of our traffic is internal or first-party apps, custom filters matter and per-request pricing would be expensive, Spring Cloud Gateway scores well. If we expose many public APIs to partners and the platform team is small, a managed gateway's portal and operations may be worth its price.
Often the honest answer is a layered one. An ingress controller keeps doing simple routing and TLS inside Kubernetes, and one standard API gateway sits at the edge for authentication, rate limiting and observability. A managed gateway can sit in front of only the partner APIs that need a portal. The goal of standardising is one gateway per purpose with clear rules, not necessarily one product for everything. We also estimate cost concretely: a managed gateway priced around a few dollars per million requests costs very little at 10 million requests a month but a meaningful amount at 5 billion, while a self-run gateway's cost is mostly engineers' time.
4Migrating Route by Route
Once the target is chosen, we never move all 100 services in one night. We move routes one at a time, starting with the Zuul routes because Zuul is the biggest risk, and within those with low-traffic, low-risk services. Each route goes through the same steps.
- Recreate the route and its filterswith tests against a stub backend
- Mirror read trafficcompare status and latency, no user effect
- Shift 5 percent of real trafficweighted DNS or load balancer
- Errors and latency within limits?YesIncrease to 25, 50, 100 percentNoShift back to the old gateway
- Keep the old route for two weeksthen remove it
5 steps in order. Play them, or step through them one at a time.
Traffic mirroring sends a copy of real requests to the new gateway and discards its responses, which lets us compare status codes and latency without any user effect. It only suits read requests, since mirroring a POST would perform the action twice. After mirroring, we shift a small share of real traffic, such as 5 percent through weighted DNS or the load balancer, then 25, 50 and 100 percent, watching error rates and latency. Rollback is a weight change back to the old gateway, and we keep the old route available for a week or two after reaching 100 percent. Once all routes of a gateway have moved, we turn it off.
5Running the Chosen Standard
After migration, a standard needs ownership. One platform team owns the edge, publishes how teams add routes (for example a pull request to a routes repository, reviewed automatically), and provides shared filters for authentication and headers. Teams get dashboards per route. We review the decision once a year or when traffic or requirements change significantly, because the cost balance between self-run and managed shifts with scale.
6Follow-up questions
Can Spring Cloud Gateway replace NGINX ingress too?
It could, but it rarely needs to. An ingress controller is a cheap, well-understood way to get traffic into the cluster with TLS. Spring Cloud Gateway can sit behind it as the API layer. Replacing ingress adds work without solving a real problem.
What do we do with Zuul's custom filters?
Classify them. Standard behaviours, such as adding headers or stripping prefixes, map to built-in filters in the target. Business-specific behaviour moves into the owning service. Truly custom edge logic is rewritten as a gateway filter with tests, or dropped if nobody needs it anymore.
How do you avoid a long period running three gateways?
Set a deadline per gateway with leadership support, track the number of routes left on each one weekly, and make the new gateway the only option for new services from day one, so the old ones only shrink.
7Conclusion
In this answer, we chose an edge standard by starting from the required features and the behaviour of today's custom filters, compared Spring Cloud Gateway's control with a managed gateway's lower operations and an ingress controller's simplicity, and decided with weighted criteria and real cost estimates. We replaced Zuul first, since it is no longer supported, and migrated route by route with mirroring, canary percentages and a fast rollback.
Open with
I would not start from a product; I would start from the list of edge features we need: routing, TLS, token validation, rate limiting and quotas, observability, and a developer portal if we publish partner APIs, plus the custom filters the current gateways run, since each needs a home.
Then, if they want more
Then I would compare. Spring Cloud Gateway gives us full Java customisation and Spring integration, but we operate, scale and patch it. A managed gateway takes the operations away and often includes a portal and API keys, but limits customisation, adds a per-request cost that grows with traffic, and ties us to one cloud.
NGINX ingress is great for simple routing and TLS inside the cluster. Zuul 1 is out regardless, because Spring Cloud dropped it in 2020.0, so it goes first. I would weight the criteria with platform, security and service teams and estimate the cost at our real volume.
Often the result is layered: ingress for cluster entry, one standard API gateway, maybe a managed gateway only for partner APIs.
For migration, I would move route by route, recreating each route with tests, mirroring read traffic to compare results, then shifting 5, 25, 50 and 100 percent with weighted routing, with rollback as a weight change, and turning each old gateway off once its routes are gone.
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 company has 100 services behind a mix of NGINX ingress, an old Zuul gateway and a...": https://scrivio-interview-library.netlify.app/spring-boot/spring-cloud/f60a22804b/