-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Run HTTP and WS servers on the same port #860
Comments
Can anyone comment on the status of this? |
At the moment you have to run nginx in front of graph-node to expose subscriptions and queries on the same port. The support for subscriptions in graph-node has issues and we currently recommend utilizing polling. Subscriptions will be supported in a different form in the decentralized protocol. |
Thanks for the answer @leoyvens. If I start graph-node with 443 ssl port (--ws-port=443) as per @iameli 's suggestion, I ran into the following error I have tried to elevate permissions of cargo to allow this, without success, so I wonder how you can bind to that kind of low numbered port
Another thing I have tried is running graph-node like this:
But then I get this: |
@J-Mars Looks like the port is already in use by another process in your system. That issue is not specific to graph node. |
2 years passed, any feedback? other consumers still face some problems. WS and GraphQL are not working when dealing with a reverse proxy to protect Graphnode instances with SSL over one single port & from DDoS attacks. |
We don't have a WS port anymore, so this is now moot |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
HTTP and Websockets are on different ports
What is the expected behavior?
It'd be nice to have them be able to run on the same port, especially when setting up production graph-node servers that are only exposed over HTTPS.
I'm currently working around this with a mildly-hilarious series of hacks... first off, I run
graph-node
with--ws-port=443
, which tricks GraphiQL into using that for websocket connections. Then, I'm running an nginx proxy in front of graph node that routes connections appropriately:That takes care of sending HTTP requests with
Upgrade: websocket
to the WS server and normal HTTP connections to the normal HTTP server. The net result is a node and GraphiQL that handles both WS and non-WS HTTP connections over HTTPS: https://graph.livepeer.org/subgraphs/name/livepeer/graphql?query=query%20%7B%0A%20%20transcoders%20(first%3A%2025)%20%7B%0A%20%20%20%20id%0A%20%20%7D%0A%7DBut it'd be nice if this was possible to do on the server itself.
The text was updated successfully, but these errors were encountered: