Search code examples
websocketopenshift

Hosting Websocket Server on Openshift


I have a service currently forwarding https://url... to http port 8080 of the pod.

Now I want to also forward wss://url:8443 to ws port 8443 of the pod.

I have a few questions, such as:

  • Will openshift map wss to ws by default if I check the secure option?
  • Do I need 2 services using 1 pod?
  • Do I need 1 service with 2 routes?
  • Is there openshift documentation specific to opening wss connection to websocket server?
  • Is there an example that works with openshift done by someone else (with enough information to reproduce...)?

Solution

  • The solution was to us "wss://:443/route"

    route is optional depending on how you define the socket server.

    Port is optional but you can verify it by going to the url given by openshift so https://... and add :443, The page might load if you are using glassfish/grizzly, trying url:8443 or 8080 or 80 or 8000 etc you can figure which port you are meant to use, default for https is 443.