0
0
Microservicessystem_design~20 mins

REST API between services in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
REST API Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the main advantage of using REST APIs between microservices?

Consider a system where multiple microservices communicate using REST APIs. What is the primary benefit of this approach?

AIt enforces a strict contract and allows services to evolve independently.
BIt requires all services to be written in the same programming language.
CIt eliminates the need for any authentication or security measures.
DIt guarantees zero network latency between services.
Attempts:
2 left
💡 Hint

Think about how REST APIs help services stay loosely connected.

Architecture
intermediate
2:00remaining
Which component is essential to manage REST API calls between microservices for load balancing?

In a microservices architecture using REST APIs, which component helps distribute incoming requests evenly across service instances?

AMessage Queue
BDatabase Proxy
CAPI Gateway
DLoad Balancer
Attempts:
2 left
💡 Hint

Think about what balances traffic among multiple servers.

scaling
advanced
2:00remaining
What is the best approach to handle high traffic REST API calls between microservices to avoid bottlenecks?

You notice that a microservice is overwhelmed by REST API calls from other services during peak times. Which approach best helps to scale and avoid bottlenecks?

ADisable caching to ensure fresh data on every request.
BIncrease the timeout value for REST API calls to wait longer for responses.
CImplement asynchronous communication using message queues instead of direct REST calls.
DReduce the number of service instances to limit traffic.
Attempts:
2 left
💡 Hint

Think about decoupling services to handle load better.

tradeoff
advanced
2:00remaining
What is a tradeoff when using REST APIs synchronously between microservices?

Using synchronous REST API calls between microservices has benefits and drawbacks. Which option correctly describes a tradeoff?

ASynchronous calls simplify error handling but increase latency and reduce fault tolerance.
BSynchronous calls eliminate network overhead but require complex message brokers.
CSynchronous calls guarantee zero data loss but prevent service scaling.
DSynchronous calls allow services to run offline without connectivity.
Attempts:
2 left
💡 Hint

Consider how waiting for responses affects system behavior.

estimation
expert
2:00remaining
Estimate the number of REST API requests per second a microservice cluster can handle given these parameters

A microservice cluster has 5 instances. Each instance can handle 200 REST API requests per second. The load balancer distributes requests evenly. What is the total maximum requests per second the cluster can handle?

A200 requests per second
B1000 requests per second
C400 requests per second
D2500 requests per second
Attempts:
2 left
💡 Hint

Multiply the number of instances by the capacity per instance.