Java core learning path Level 3 This level · 16 of 19
Medium java spring

Remove the API gateway; frontend calls all six services directly?

The 30 second answer

The frontend now knows every service URL and contract, which couples clients to internals and makes versioning painful. You get many round trips on mobile, and auth, rate limiting, TLS, CORS, and logging get duplicated six times. Every service is publicly exposed, so the attack surface grows, and refactoring service boundaries breaks clients. Prefer a gateway or a backend-for-frontend per client type.

Could you say this in an interview?

Frontend now knows every service URL and API (coupling, versioning pain), makes many round trips (chatty, slow on mobile), and cross-cutting concerns — auth, rate limiting, TLS, CORS, logging — get duplicated in six places; every service is publicly exposed (bigger attack surface); refactoring service boundaries breaks clients. Alternatives: gateway or BFF (backend-for-frontend) per client.

Sources (2)
  1. microservices.io — API Gateway / BFF patternmicroservices.io
  2. Spring Cloud Gatewaydocs.spring.io
Previous
Next