Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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...)?
like image 864
Bruno Avatar asked Jul 05 '26 04:07

Bruno


1 Answers

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.

like image 124
Bruno Avatar answered Jul 10 '26 09:07

Bruno



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!