0
0
Rest APIprogramming~20 mins

API gateway patterns in Rest API - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
API Gateway Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary role of an API Gateway in microservices architecture?

Choose the best description of the main function of an API Gateway.

AIt acts as a single entry point that routes client requests to multiple backend services.
BIt directly manages the internal communication between microservices without client involvement.
CIt replaces the need for load balancers by distributing traffic evenly.
DIt stores all the data for the microservices in a centralized database.
Attempts:
2 left
💡 Hint

Think about how clients interact with many services through one interface.

Architecture
intermediate
2:00remaining
Which API Gateway pattern best supports aggregating data from multiple microservices into one response?

Select the API Gateway pattern designed to combine responses from several services into a single client response.

AAggregator Pattern
BProxy Pattern
CChained Pattern
DFacade Pattern
Attempts:
2 left
💡 Hint

Think about a pattern that collects and merges data from different sources.

scaling
advanced
2:00remaining
How does an API Gateway help improve scalability in a microservices system?

Identify the way an API Gateway contributes to system scalability.

ABy storing user sessions and state information centrally.
BBy caching responses and reducing repeated calls to backend services.
CBy directly scaling database clusters automatically.
DBy replacing microservices with a monolithic service.
Attempts:
2 left
💡 Hint

Consider how reducing backend load can help scale the system.

tradeoff
advanced
2:00remaining
What is a common tradeoff when using an API Gateway in a system architecture?

Choose the main disadvantage or risk introduced by adding an API Gateway.

AIt always increases the overall system latency significantly.
BIt eliminates the need for security measures in backend services.
CIt removes the need for service discovery mechanisms.
DIt can become a single point of failure if not designed with redundancy.
Attempts:
2 left
💡 Hint

Think about what happens if the gateway stops working.

estimation
expert
3:00remaining
Estimate the number of concurrent connections an API Gateway must handle for a system with 10,000 daily active users, each making 50 requests per hour during peak 2 hours.

Calculate the approximate concurrent connections the API Gateway should support during peak load.

AApproximately 140,000 concurrent connections
BApproximately 14,000 concurrent connections
CApproximately 7,000 concurrent connections
DApproximately 700 concurrent connections
Attempts:
2 left
💡 Hint

Calculate total requests during peak, then estimate how many happen simultaneously assuming average request duration.