-
-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] Using Centrifugo-js in backend side (Websocket) #665
Comments
Hello, using client SDK on the backend side may work - but it's not a scalable approach if you want to consume many channels and many messages. The idiomatic way to integrate with Centrifugo is outlined in the documentation. App users connect over real-time SDKs, backend uses server API to communicate with Centrifugo. Trying to answer the questions:
As said above - it may work for basic cases, but does not scale and may quickly become a bottleneck. Real-time SDKs exist for the application users with a reasonable message rate, not for the backend.
You can try to find a reproducer, then isolate the root cause step by step. Think why the connection may be closed - it involves log inspection, understanding message volume. I'd start with server logs. If the connection is closed during "peak" hours as you mentioned - then it possibly can not keep up with the incoming message rate. You can also take |
thanks a lot 😍 |
hi :)
we are using centrifugo-js in our back-end application for
rpc
,join/leave
,publish
, ...but in peak times on our application our web-scoket connection from back-end to centrifugo server is disconnecting and reconnecting .
What does "reason" means ins this error message:
disconnect context
: the reason is connection closed and reconnect is truethank you
The text was updated successfully, but these errors were encountered: