1

There's data providers that offer you X ammount of websockets connections to get realtime data from them, I wanted to know if somehow there's a way to use nginx as a reverse-proxy in order to suscribe to that endpoint my data provider offers realtime data with websockets in order to act as a bridge to get realtime data through my reverse-proxy instead of going with them.

Basically suscribe to their websocket but with my reverse-proxy and offer my reverse-proxy as a websocket to ANY ammount of clients to bypass that limitation of my provider

Sorry I cant provide any example of this, I havent found anything like it on the web. Im still crawling it.

Napal
  • 113

1 Answers1

1

Simple answer: no. (at least without modules)

NGINX can only forward requests and distribute to multiple backends but can not "subscribe" to a websocket and broadcast it to multiple subscribing clients.

You need an appserver for that which opens the websocket and handles the broadcasting to clients (which can come from NGINX).

unNamed
  • 660