Microservices API Gateway and Management 2 — Questions and Answers
Question 1: Which API gateway pattern provides a tailored API for each client type, such as separate endpoints for web and mobile apps?
- Backend for Frontend (BFF) (Correct answer)
- Strangler Fig
- Sidecar
- Bulkhead
Correct answer: Backend for Frontend (BFF)
The Backend for Frontend pattern creates a dedicated gateway per client type to optimize responses for each.
Question 2: What is the primary purpose of request aggregation in an API gateway?
- To combine multiple downstream service calls into a single client response (Correct answer)
- To encrypt all outgoing traffic
- To cache static assets
- To rotate TLS certificates
Correct answer: To combine multiple downstream service calls into a single client response
Request aggregation lets the gateway fan out to several services and merge results, reducing client round trips.
Question 3: Which gateway feature limits the number of requests a client can make in a given time window?
- Rate limiting (Correct answer)
- Service discovery
- Circuit breaking
- Content negotiation
Correct answer: Rate limiting
Rate limiting throttles client requests to protect backend services from overload.
Question 4: When a gateway terminates TLS and forwards plain HTTP internally, this is known as:
- TLS termination (Correct answer)
- Mutual TLS
- Certificate pinning
- TLS passthrough
Correct answer: TLS termination
TLS termination decrypts incoming traffic at the gateway, offloading crypto work from backend services.
Question 5: What does a circuit breaker in an API gateway prevent?
- Repeated calls to a failing downstream service (Correct answer)
- Unauthorized user logins
- SQL injection attacks
- Duplicate cache entries
Correct answer: Repeated calls to a failing downstream service
A circuit breaker stops forwarding requests to an unhealthy service, allowing it to recover and avoiding cascading failures.
Question 6: Which standard is most commonly used by API gateways to validate bearer tokens for authorization?
- OAuth 2.0 / JWT (Correct answer)
- FTP
- SMTP
- SNMP
Correct answer: OAuth 2.0 / JWT
Gateways typically validate OAuth 2.0 access tokens, often JWTs, to authorize incoming requests.
Question 7: What is a key drawback of routing all traffic through a single API gateway?
- It can become a single point of failure and bottleneck (Correct answer)
- It eliminates the need for monitoring
- It prevents the use of HTTPS
- It removes all latency
Correct answer: It can become a single point of failure and bottleneck
A centralized gateway concentrates traffic, so it must be highly available and scaled to avoid being a bottleneck or failure point.
Which API gateway pattern provides a tailored API for each client type, such as separate endpoints for web and mobile apps?