-
Notifications
You must be signed in to change notification settings - Fork 323
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
Use websockets for events (Client limit) #3
Comments
You will hit the same browser-side connection limit. HTTP/2 should fix the issue you are seeing. Until then, it's domain sharding for you. There may be other good reasons to switch to WebSockets, but this is not one IMHO. Source:
|
Ah, seems like the article I read was wrong. Then I'll stay with running 2 seperate browsers :) |
You can also use a technique called domain sharding. Add DNS entries to your DNS server or local hosts file that all point to the same server. The browser-side limitation is not smart and relies entirely on hostname matching, so it is easy to fool. For example: /etc/hosts or c:\Windows\System32\Drivers\etc\hosts
Then you can open 6-10 tabs on each "server" by it's hostname (depending on browser). http://dashing-server1 |
I'll leave this ticket open for a while, in case anybody wants to discuss moving WebSockets for other reasons. |
Why not use Firefox and change the following setting in about:config? |
@tokudan sometimes changes in the browser are not possible. e.g. when someone from another company, or even an executive, or someone without technical skills need to access the dashboard. Would be nice to have a solution without the user having to change any setting in his browser. |
Sometimes a browser change is possible, and I didn't know that this could be done. Thanks for the tip @tokudan! The only solution to this is domain sharding. On further contemplation, HTTP/2 likely will not solve this problem. WebSockets, I know from experience, suffer the same problem. If you need to make this executive-proof, then use another page that does a 301 redirect or good-old-HTML meta refresh to the sharded domain (dashing-1.dashing.board, dashing-2.dashing.board, etc). Another option - that is just crazy enough to fix this - would be for new tabs to discover and communicate with the parent window via postMessage, so that the first tab opened would essentially multiplex the connection (SSE or WebSocket). This vastly increases complexity of the base solution, but it would be interesting to add this as a component or dashing-contrib gem. Unfortunately, the current design of Dashing makes it hard to extend or modify core functionality like this (ie: how do you monkey-patch this). This, and many other parts of Dashing, could be refactored to be more extensible. I am closing this, there are two reasonable solutions suggested. I have linked to this in the Wiki. |
We're having the issue that we want to run 8 dashboards at the same time. Due to the HTTP client limit, we have to open 2 different browsers to make this work.
Switching to websockets seems like a good idea, first of all it's better for the use case and websockets don't have a client limit.
The text was updated successfully, but these errors were encountered: