It's a bit more complicated than that. WebSocket and Server-Sent events cannot be really used interchangeably. Each addresses a different situation. If your backend architecture is event-driven, you'll have to use WebSocket (or MQTT or long/short polling). It's because in an event driven arch, a request to the backend will normally trigger a chain of asynchronous calls to multiple microservices. Once an incoming request leaves the boundary of the first microservice it will be forgotten and left to the broker, and server-sent event solution is almost impractical in this situation (the first microservice that handles the HTTP request should wait…

Saeed Aghaee

I am a technical architect and consultant, primarily working in the financial services industry.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store