Integrating a HyperServer Cluster
Probably the best way to add WebSockets capability to a HyperServer cluster is to connect it to a dedicated WebSockets server. If you have a cluster and want to add WebSockets support to its applications, the easiest path is Using a Dedicated WebSockets Server and configuring your cluster to use it. This approach works regardless of your HyperServer deployment method (for example, when HyperServer is deployed as an ISAPI module).
You need to make a few changes in the related CFG file of your HyperServer. If your cluster is a server farm, make these changes only in the master HyperServer CFG file.
If you open the CFG file you will see a section named websockets with various parameters:
[websockets]
enabled=1
aux_port=0
max_queue_length=1000
binding=
global_binding=socket.fmsoft.net
global_port=0
external_server_url=http://socket.fmsoft.net
external_server_token=vwuczx230317155031443
app_domain=testapplicationYou should configure the same parameters that are described in Testing the Dedicated Server.
Parameters
external_server_url This is the URL to which commands are relayed on the WebSockets server. It can be a local URL accessible through your cluster or, preferably, a globally accessible URL.
external_server_token The token string that is set and available in the CFG file of your dedicated WebSockets HyperServer. It should be set so only authorized applications can relay commands to the dedicated server.
global_binding A domain visible to the global web. This domain is used to establish WebSocket connections. Often it can be the same domain as external_server_url. In the example above socket.fmsoft.net is used for both settings.
app_domain Optional. Configure this only if more than one cluster or multiple standalone applications will connect to the same dedicated WebSockets server. This parameter helps avoid confusion when the same application name exists in different clusters or when the same standalone application is deployed multiple times but connects to the same WebSockets server. Set a unique name to distinguish between applications. If only one cluster connects to the dedicated WebSockets server, you can leave this parameter blank.
Note: When using WebSockets with a HyperServer cluster, all HyperServer instances and the Node application must be compiled with build 1566 or later. Many of the WebSockets features are available only in build 1566+.
Related links:
Using a Dedicated WebSockets Server: https://unigui.com/doc/online_help/using-a-dedicated-websockets-s.htm
Testing the Dedicated Server: https://unigui.com/doc/online_help/testing-the-dedicated-server.htm