API Gateways and Service Meshes Interview Questions

1,511 multiple-choice tech interview questions on API Gateways and Service Meshes: API gateway responsibilities, thin and fat gateways, edge and micro gateways, offloading, high availability, request path and header hygiene, ownership and configuration, API management versus the gateway, routing and path rewriting, BFF and experience APIs, composition, API versioning, protocol translation, WAF and OWASP CRS, API keys and token introspection, sender-constrained tokens, shadow APIs, coarse-grained authorization, rate limiting, token bucket and spike arrest, load shedding, usage plans, response caching, request transformation, throttling, per-route timeouts, connection pools, Retry-After, power of two choices, reverse proxies, Kong and OpenResty, Apigee, YARP, Spring Cloud Gateway, KrakenD, Envoy Gateway, Azure APIM v2 and self-hosted gateways, AWS API Gateway, Traefik, HAProxy, Tyk, Ocelot, Cloudflare API Shield, library versus product, managed and hybrid deployment, control plane versus data plane, gateway sprawl, federated API management, plugin models, proxy-wasm, API linting, and official-entry cost models, service mesh sidecars and ambient mode, mTLS, traffic shifting and observability. Written for technical phone screens and interview prep, organized by subtopic, with a short explanation for every answer. Learn the 121 key terms with the flashcards first, then test yourself.

Take the practice test · Flashcards · All study tools

What it covers

  1. 7.1 API gateway fundamentals
  2. 7.2 Routing, composition and Backend for Frontend
  3. 7.3 Gateway security: identity and threat protection
  4. 7.4 Traffic policies: limits, caching and transformation
  5. 7.5 Gateway products and deployment models
  6. 7.6 Service mesh architecture
  7. 7.7 Mesh traffic management and resilience
  8. 7.8 Mesh security and zero trust
  9. 7.9 Kubernetes Gateway API, observability and operations

Key terms

7.1 API gateway fundamentals

API gateway
Single entry point routing requests and enforcing cross-cutting policies
TLS termination
Decrypting HTTPS at a proxy before forwarding
Edge gateway
Gateway where outside traffic enters the system
Gateway offloading
Moving shared concerns like TLS and auth to the gateway
Gateway routing
One endpoint routing to many services
Gateway aggregation
One call fanning out and combining results
Upstream
The backend a proxy forwards to
Developer portal
Site for discovering APIs, docs and keys
API management
Gateway plus portal, keys, analytics and lifecycle
Smart endpoints, dumb pipes
Keep logic in services and plumbing simple
Thin gateway
A gateway limited to routing and shared policies, leaving domain rules in the services
Fat gateway
The anti-pattern of piling business logic and orchestration into the shared entry until it becomes a coupled bottleneck
Micro gateway
A gateway that fronts an internal domain or team rather than the public edge
Downstream
The client-facing side of a proxy, as opposed to the upstream backends it forwards to
Header normalization
Cleaning and standardizing headers at the official entry before they are forwarded
Request ID
An identifier attached at the official entry so logs and traces can be tied to one client call
Stateless gateway
Gateway instances that keep no must-have local session or counter, so any healthy instance can handle the next request

7.2 Routing, composition and Backend for Frontend

BFF
Backend tailored to one client type
Token bucket
Rate-limit algorithm allowing bursts up to a refill rate
Strangler fig
Gradually routing traffic from a legacy system to new services
Path-based routing
Routing by URL path
Host-based routing
Routing by the Host header
Header-based routing
Routing by request headers, like a canary flag
Path rewriting
Changing the path before forwarding
Request mirroring
Copying traffic to a new service without using its responses
Weighted routing
Splitting traffic by percentage
Protocol translation
Exposing a backend in another protocol
API product
Bundle of APIs offered together with a plan
Experience API
An API designed around a user journey or screen, rather than around internal service boundaries
URI versioning
Putting the major API version in the public path so the official entry can route it
Header versioning
Expressing the API version in a request header that the official entry must require and match
Strip prefix
Removing a leading public path segment before the request is forwarded to the upstream
Method-based routing
Choosing a backend using the HTTP method, usually together with the path
Fail-soft composition
Returning the parts of a composed response that succeeded and marking the parts that could not be filled
API facade
A simple public API surface that hides several internal services or protocols

7.3 Gateway security: identity and threat protection

Coarse-grained authorization
Allowing or denying routes by scopes or roles
API key
Secret identifying a calling app, not a user
WAF
Web application firewall inspecting HTTP traffic
OWASP CRS
Generic WAF rule set from OWASP
Positive security model
Allow only known-good requests
Shadow API
Endpoint that bypasses the gateway and its controls
Token introspection
Asking the auth server if an opaque token is valid
Sender-constrained token
Token usable only by the holder of a bound key
Signed internal token
A short-lived token the official entry mints for backends so services receive trusted identity claims without parsing the caller's external token
WAF detection mode
A WAF setting that logs rule matches without blocking, used to tune false positives before enforcement
Coraza
A memory-safe web application firewall engine that can apply the OWASP Core Rule Set
Request schema validation
Checking a request's shape, types, and required fields against a published contract, such as OpenAPI, at the official entry
Parser bomb
A compact payload designed to make a JSON or XML parser exhaust CPU or memory
Bot management
Telling genuine API clients from automated abuse at the official entry, using credentials, attestation, or behavior rather than only a human puzzle
Re-encryption
Opening a new TLS session from the official entry to backends after terminating the client's TLS connection

7.4 Traffic policies: limits, caching and transformation

Spike arrest
Smoothing bursts by spreading allowed requests
Load shedding
Dropping work when overloaded to protect the system
Sliding-window counter
Rate limit weighting previous and current windows
Usage plan
Quotas and limits for a group of consumers
Request transformation
Changing headers, paths or bodies before forwarding
Power of two choices
Pick two random backends and use the less loaded one
Throttling
Slowing or delaying requests rather than rejecting them
Per-route timeout
A timeout configured for one official-entry route so a slow backend cannot hold every request to the same deadline
Upstream connection pool
A per-backend set of reusable connections at the official entry so one slow upstream cannot exhaust sockets for the others
Gateway response cache
A cache at the official entry that stores safe, cacheable responses so repeated reads need not reach the backend
RateLimit header
HTTP response fields that tell a client its remaining quota and when that quota resets
Quota reset policy
The rule that says when a consumed usage-plan quota is restored, such as midnight UTC or a rolling 24 hours
Concurrent request limit
A cap on how many in-flight requests a consumer may hold, as opposed to a cap on requests per unit of time
GCRA
The Generic Cell Rate Algorithm: a rate limiter that admits a request if it arrives no earlier than a theoretical emission time, with a configured burst tolerance

7.5 Gateway products and deployment models

Kong Gateway
Gateway built on NGINX and OpenResty with plugins
Apigee
Google Cloud's API management platform
YARP
Microsoft's reverse proxy library for .NET
Spring Cloud Gateway
JVM gateway built on Spring
KrakenD
Stateless Go gateway focused on aggregation
Envoy Gateway
Envoy run as a gateway via Kubernetes Gateway API
Self-hosted gateway
Vendor gateway container in your environment
Gateway sprawl
Many uncoordinated gateways with inconsistent policies
proxy-wasm
Shared Wasm plugin interface across proxies
Kong Konnect
Kong's managed control plane that configures Kong data planes you run, or that Kong hosts, without putting that control plane on the request path
OpenResty
An NGINX distribution with LuaJIT that Kong Gateway's classic data plane is built on
Fail-static
A data-plane behavior that keeps serving the last loaded configuration when the control plane is unreachable, without receiving updates until it reconnects
Federated API management
A model with central standards and a shared catalog while teams still operate their own official-entry data planes
API linting
Checking API specifications against agreed style and design rules before those specs become routes, docs, or gateway policies
Traefik
An edge router and official-entry product known for discovering routes from Docker, Kubernetes, and other dynamic sources
Library gateway
An official entry you embed in your own application process, such as YARP, Ocelot, or Spring Cloud Gateway, rather than running a standalone proxy product

7.6 Service mesh architecture

Service mesh
Infrastructure layer for service-to-service traffic, security and telemetry
Sidecar
Proxy container deployed alongside each service instance
North-south traffic
Traffic entering or leaving the system, as opposed to east-west between services
ztunnel
Istio ambient's per-node layer-4 and mTLS proxy
Waypoint proxy
Optional Istio ambient proxy for layer-7 features
istiod
Istio's control plane
xDS
APIs a control plane uses to configure Envoy-style proxies
East-west traffic
Traffic between services inside the system
East-west gateway
Gateway linking mesh traffic across clusters
Native sidecar container
Kubernetes sidecar that starts before and stops after the app
Linkerd micro-proxy
Linkerd's lightweight Rust proxy
Cilium
eBPF-based networking with mesh features

7.7 Mesh traffic management and resilience

VirtualService
Istio resource defining request routing rules
DestinationRule
Istio resource for post-routing policies like subsets
Outlier detection
Ejecting hosts with too many errors for a while
Per-try timeout
Time limit for each retry attempt
Locality-aware load balancing
Preferring endpoints in the same zone or region
Progressive delivery
Automated, metric-driven gradual releases
Dark launch
Releasing to internal or test users only

7.8 Mesh security and zero trust

mTLS
Both client and server authenticate with certificates
Canary release
Routing a small share of traffic to a new version first
Zero trust
No caller is trusted because of network location
PeerAuthentication
Istio policy requiring or allowing mTLS
Permissive mTLS
Accepting both mTLS and plain text during migration
SPIFFE ID
URI naming a workload identity
SPIRE
Reference implementation issuing SPIFFE identities
Workload attestation
Verifying a workload before issuing its identity
Trust domain
Scope within which identities are trusted
Default deny
Blocking calls unless explicitly allowed
Egress gateway
Controlled exit point for outbound traffic
RequestAuthentication
Istio policy validating end-user JWTs
Trust bundle
Root certificates shared to verify workloads

7.9 Kubernetes Gateway API, observability and operations

GatewayClass
Kind of gateway tied to a controller implementation
Gateway
Gateway API resource for a load balancer or proxy instance
HTTPRoute
Gateway API resource defining HTTP routing rules
ReferenceGrant
Allows cross-namespace references in Gateway API
GAMMA
Gateway API work for service mesh routing
Ingress2Gateway
Tool translating Ingress to Gateway API
Kiali
Console visualizing Istio service graphs
Config drift
Live config differing from version control
BackendTLSPolicy
Gateway API policy for TLS to backends

Sample practice questions

  1. What is an API gateway?

    1. A database that stores API keys and their usage history for every client
    2. A library for writing REST controllers inside each backend service
    3. A tool that only generates API documentation from source code annotations
    4. A single entry point that routes requests and handles auth, rate limits and TLS

    Answer: D. A single entry point that routes requests and handles auth, rate limits and TLS Examples include Azure API Management, AWS API Gateway, Kong and Apigee.

  2. What is request aggregation (API composition) at a gateway?

    1. Compressing each incoming request into a ZIP file before forwarding it
    2. Calling several backends and combining the results into one response
    3. Merging the source code of two separate APIs into a single project
    4. Sending one incoming request to every backend server at the same time

    Answer: B. Calling several backends and combining the results into one response It reduces client round trips, especially for mobile clients on slow networks.

  3. Why validate tokens at the gateway and again in services?

    1. Validating twice makes tokens last longer
    2. Gateways can't read tokens at all
    3. Defense in depth: services shouldn't trust callers blindly
    4. Services are faster at validating than gateways

    Answer: C. Defense in depth: services shouldn't trust callers blindly Zero trust inside too.

  4. What is the token bucket algorithm used for in rate limiting?

    1. Storing users' authentication tokens in a cloud storage bucket
    2. Tokens refill steadily and requests spend them, allowing short bursts
    3. Encrypting each request with a token before it's forwarded
    4. Sorting incoming requests by priority before processing them

    Answer: B. Tokens refill steadily and requests spend them, allowing short bursts Sliding window and fixed window counters are other common algorithms.

  5. Kong Gateway is built on which proxy?

    1. NGINX with OpenResty
    2. Apache httpd
    3. HAProxy
    4. Envoy

    Answer: A. NGINX with OpenResty Plugins are often written in Lua.

  6. What is a service mesh?

    1. A physical layout for the network cables connecting servers in racks
    2. A database replication scheme that copies data between services
    3. A UI component library shared by every front end in the company
    4. A layer handling service-to-service mTLS, retries, routing and telemetry

    Answer: D. A layer handling service-to-service mTLS, retries, routing and telemetry Istio, Linkerd and Consul are common meshes, mostly on Kubernetes.

  7. How does a service mesh enable a canary release?

    1. By deploying the new version to every pod at the same moment
    2. By shutting down the old version before starting the new one
    3. By routing a set share of traffic, like 5%, to the new version
    4. By copying the production database for the new version to use

    Answer: C. By routing a set share of traffic, like 5%, to the new version Istio VirtualService and Gateway API HTTPRoute resources support weighted routing.

  8. What does mutual TLS (mTLS) in a service mesh provide?

    1. Both sides present certificates, so services authenticate and traffic is encrypted
    2. Only the client's side of the connection is encrypted, never the server's
    3. Passwords are sent in plain text alongside each request for authentication
    4. TLS is turned off between services so calls complete as fast as possible

    Answer: A. Both sides present certificates, so services authenticate and traffic is encrypted The mesh issues and rotates workload certificates automatically, often using SPIFFE identities.

  9. What is the Kubernetes Gateway API?

    1. An API for creating and deleting entire Kubernetes clusters in the cloud
    2. Role-oriented routing resources like Gateway and HTTPRoute that succeed Ingress
    3. A single cloud vendor's proprietary gateway product for its own service
    4. A command-line replacement for kubectl that manages cluster resources

    Answer: B. Role-oriented routing resources like Gateway and HTTPRoute that succeed Ingress Meshes such as Istio and Linkerd support it for both ingress and mesh routing.

  10. Which concern is typically handled at the API gateway rather than in each service?

    1. The business rules for calculating order totals
    2. Validating access tokens and enforcing rate limits
    3. Running database schema migrations on deploy
    4. Rendering React components on the server

    Answer: B. Validating access tokens and enforcing rate limits Centralizing cross-cutting concerns avoids reimplementing them in every service.

Practice all 1,511 questions

More Architecture