0
0
NestJSframework~20 mins

Microservice transports in NestJS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Microservice Transport Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Microservice Transport Protocols

Which of the following transport protocols is most suitable for low-latency, high-throughput communication between microservices in a distributed system?

AFTP (File Transfer Protocol)
BgRPC over HTTP/2
CSMTP (Simple Mail Transfer Protocol)
DHTTP/REST over TCP
Attempts:
2 left
💡 Hint

Think about protocols designed for fast, efficient communication with support for streaming and multiplexing.

Architecture
intermediate
2:00remaining
Choosing Transport for Event-Driven Microservices

You are designing an event-driven microservice system where services communicate asynchronously. Which transport mechanism below best supports asynchronous message passing with guaranteed delivery?

AgRPC Unary Calls
BHTTP Polling
CWebSockets
DRabbitMQ (AMQP protocol)
Attempts:
2 left
💡 Hint

Look for a message broker that supports queues and acknowledgments.

scaling
advanced
2:30remaining
Scaling Microservices with Transport Choices

When scaling microservices horizontally, which transport approach minimizes connection overhead and supports load balancing effectively?

AMultiple HTTP/1.1 connections per client
BOpening new TCP connections for each request
CSingle persistent HTTP/2 connection with multiplexing
DUsing UDP for all microservice communication
Attempts:
2 left
💡 Hint

Consider how connection reuse and multiplexing affect resource usage and load balancing.

tradeoff
advanced
2:30remaining
Tradeoffs Between Synchronous and Asynchronous Transports

Which statement correctly describes a tradeoff when choosing synchronous (e.g., HTTP/gRPC) versus asynchronous (e.g., message queues) transports for microservices?

AAsynchronous transports improve fault tolerance but increase message latency.
BSynchronous transports always guarantee message delivery, asynchronous never do.
CSynchronous transports are better for decoupling services than asynchronous transports.
DAsynchronous transports require services to be tightly coupled.
Attempts:
2 left
💡 Hint

Think about how asynchronous messaging affects timing and reliability.

estimation
expert
3:00remaining
Estimating Capacity for Microservice Transport Layer

You have a microservice system using RabbitMQ for asynchronous messaging. Each message is 1 KB. The system expects 10,000 messages per second. Estimate the minimum network bandwidth in Mbps required to handle this load without bottlenecks (assume 8 bits per byte).

A80 Mbps
B64 Mbps
C100 Mbps
D10 Mbps
Attempts:
2 left
💡 Hint

Calculate total bits per second: message size in bytes × 8 × messages per second, then convert to Mbps.