Recall & Review
beginner
What is a microservice transport in the context of NestJS?
A microservice transport is the communication method used by microservices to send and receive messages. In NestJS, transports define how microservices connect and exchange data, such as TCP, Redis, or MQTT.
Click to reveal answer
beginner
Name three common transport layers supported by NestJS microservices.
TCP, Redis, and MQTT are three common transport layers supported by NestJS for microservice communication.
Click to reveal answer
intermediate
Why is TCP transport often used for microservices in NestJS?
TCP transport is used because it provides a reliable, fast, and simple connection-oriented communication channel between microservices, suitable for many internal service calls.
Click to reveal answer
intermediate
How does Redis transport help in microservice communication?
Redis transport uses Redis Pub/Sub to enable asynchronous message passing between microservices, which helps decouple services and supports event-driven architectures.
Click to reveal answer
advanced
What is the main advantage of using MQTT transport in NestJS microservices?
MQTT transport is lightweight and designed for unreliable networks, making it ideal for IoT or mobile microservices that need efficient, low-bandwidth communication.
Click to reveal answer
Which NestJS transport uses a publish-subscribe model for messaging?
✗ Incorrect
Redis transport uses the publish-subscribe model to send messages asynchronously between microservices.
What type of communication does TCP transport provide in NestJS microservices?
✗ Incorrect
TCP transport provides a connection-oriented and reliable communication channel.
Which transport is best suited for IoT devices in NestJS microservices?
✗ Incorrect
MQTT is lightweight and designed for unreliable networks, ideal for IoT devices.
In NestJS, which transport layer supports asynchronous event-driven communication?
✗ Incorrect
Redis transport supports asynchronous event-driven communication using Pub/Sub.
Which of the following is NOT a built-in NestJS microservice transport?
✗ Incorrect
HTTP is not a built-in transport in NestJS; it requires custom implementation or third-party packages.
Explain the differences between TCP, Redis, and MQTT transports in NestJS microservices.
Think about how each transport handles message delivery and network conditions.
You got /3 concepts.
Describe a real-life scenario where you would choose Redis transport over TCP in a NestJS microservice architecture.
Consider when services should not wait for immediate responses.
You got /4 concepts.