Skip to content
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

Support for ingress-controller/load balancer #31

Open
acolombier opened this issue Oct 11, 2020 · 0 comments
Open

Support for ingress-controller/load balancer #31

acolombier opened this issue Oct 11, 2020 · 0 comments

Comments

@acolombier
Copy link

_This is more of a feature request, as the issue only occurs with a specific setup (cassandra-web behind an ingress controller or a load balancer). This seems to be related to #27 _

Expected behavior

Can use cassandra-web when it sits behind any kind of proxy-like setup

Actual behavior

The home page doesn't initialize and remain empty. Furthermore, a JS exceptions shows up in the console.

Context

It appears that this limitation is related to the way Cassandra events are propagated to the front-end: The /events endpoint seems to be a blocking requests, which provides vital data in the header. The front-end loads them, by leveraging the XMLHttpRequest.readyState.HEADERS_RECEIVED and then hangs on the request, till it eventually receives event or timeout.

Fix proposal

A way to fix this issue would be to replace this endpoint with a web socket, which are widely supported by proxy-like mechanisms. After making some researches, it seems there is a package called sinatra-websocket which allow to create web-socket in a Sinatra API.

I would definitely offer my help on that one, as it seems very easy to implement, unfortunately, I have never done any Ruby, and while the syntax is very easy, I have no clue on how to provide correct testing for such a change. However, I would be very happy to help on the front-end update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant