'gRPC vs WebTransport vs WebSocket for inter-service communication
So I have built a microservice architecture-based system. My services had to communicate with each other in real time with minimum latency... Which is good for me, gRPC or WebTransport or WebSocket? And why?
My only requirement after speed...
- I need to know instantaneously if the connection breaks
- The connection should always be active, not opening on every message transmission
Edit: I will transmit structured data. Format choice is flexible..
Solution 1:[1]
From the information you've given, I'd say gRPC ticks all your boxes.
- gRPC uses channels that will throw an exception if the connection breaks.
- You only need one channel per client, which can be reused for different services you declare.
- Data is serialised and deserialised using protobuf, which makes it quite fast and efficient if you have a fixed schema.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Daniel G |
