[]
        
(Showing Draft Content)

Deploy Servers

Wyn Enterprise supports multi-server deployment that helps to balance the workload distribution among two or more machines. With multi-server deployment, you can significantly reduce the burden on each machine and enhance their work efficiency.

Note: The servers in a distributed deployment environment use the same data store.

In this section, you will learn how to deploy multiple servers in Wyn Enterprise remotely.

Before You Begin

Ensure that the following software prerequisites are installed on any accessible machine before deploying the servers,

  1. Redis version 5.0 or newer

    Ensure to update the binding IP address in Redis.windows.conf and Redis.windows-service.conf files to the IP address of the machine where Redis is installed.

  2. Nginx, used for load balancing.

Updating Configuration File on Primary Node

To enable multi-server deployment on the primary node:

  1. Go to C:⧵Program Files⧵Wyn Enterprise⧵Monitor⧵conf, and open the Wyn.conf file.

  2. Add this section under the Server element of the file to deploy multiple servers in your environment.

    Here, the ConfigString denotes the connection string for Redis.

    <EnableMultipleServers>true</EnableMultipleServers>
      <Cache>
        <DistributedMemoryCache>              
         <ConfigString>Server=address:port_number,Expire=0,Db=0,ThrowOnFailure=true,Timeout=3000</ConfigString>
        </DistributedMemoryCache>
      </Cache>  
  3. Replace localhost or 127.0.0.1 with the IP address of the primary node machine throughout the configuration file.

  4. Save the changes, and close the file.

Installing Server Module on Secondary Node

To install Server module using Node Management on the primary node machine:

  1. Open the Wyn Enterprise portal, i.e., http://localhost:51980/admin on the web browser.

  2. Switch to the Admin Portal and navigate to the Node Management page.

  3. From the Nodes tab, choose a node where you want to install the Server module except the primary node.

  4. Under the Service Information section of the node, click the Download icon to install the Server module.

    Installing the Server Module on the secondary node machine

    Once the Server module is installed successfully on the machine, its Status changes from Not Installed to Running.

  5. Save the changes.

Tip: To install multiple servers, please repeat the steps from 3 to 5.

Setting up Nginx Load Balancer

To configure Nginx as the load balancer:

  1. Go to the Nginx directory and open the Nginx.conf file.

  2. Add this section in the configuration file to balance the workload among multiple servers.

    Over here, the upstream servers represent the IP address of the machines on which the Server modules are installed.

        map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }
    
    upstream wyn {
        server 10.32.6.8:51980 max_fails=3 fail_timeout=15s;
        server 10.32.5.250:51980 max_fails=3 fail_timeout=15s;
    }
    
    server {
        listen  8089;
        location / {
            add_header backendIP $upstream_addr;
            add_header backendCode $upstream_status;
            proxy_pass http://wyn;
            # support websocket
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_set_header Host $host:$server_port;
            proxy_connect_timeout       300s;
            proxy_send_timeout          300s;
            proxy_read_timeout          300s;
            send_timeout                300s;
            sendfile on;
            proxy_buffer_size 64k;
            proxy_buffers   32 32k;
            proxy_busy_buffers_size 128k;
            fastcgi_buffers 8 16k;
            fastcgi_buffer_size 32k;
            client_max_body_size 100M;
        }
    }
  1. Save the changes and close the configuration file.

Modifying Global Settings on Primary Node

To set the global settings for the primary node:

  1. On the Admin Portal of Wyn Enterprise, navigate to System Management > Node Management page.

  2. In the Global Settings tab, set the Identity Server URL to http://<Nginx IP Address>:<Listening Port>.

    The Nginx IP address is the IP address of the machine where Nginx is installed.

  3. Click the Save button.

  4. Save Settings dialog box will appear on your screen, click the Yes button to save changes.

Note: The Wyn Enterprise service will restart on making the above changes, which may take upto 1-3 minutes.

Restarting Primary and Secondary Nodes

To restart primary and secondary node machines, go to the Start menu, and click Power > Restart.


After both the machines restart, you can visit the Wyn Enterprise portal, i.e., http://<Nginx IP Address>:<Listening Port> on the primary node machine.

If you face any issues, please try to re-login using http://<Nginx IP Address>:<Listening Port>/logout page.