Skip to main content

Load balanced environment

Basic load balancer setup architecture is show as below

For the load balance Memurai is a mandatory component as we will be using Memurai for the sessions and cache management.

You can have any number of web servers.

Install all the prerequisites on all the web servers.

It is good practice to have the database and Memurai separated from the web server. The database and Memurai can be on the same server or can be separated too.

Installation

The process is similar to the installation of Jadu on a single server, except for a few extra steps.

Run prerequisites check on node 1

  1. Download the installer from Jadu
  2. Upload the TLS file into the server
  3. Create params.yml from params.yml-WINDOWS and populate the values
  4. Run the prerequisites check command
$ php installer.phar check:setup

Install the application on node 1

You will be running the install command on main node as

$ php installer.phar install

Run prerequisites check on other nodes

  1. Download the installer from Jadu into all web servers
  2. Create params.yml from params.yml-WINDOWS and populate the values you can exclude tls file configuration here
$ php installer.phar check:setup --application-only

Install the application on other nodes

You will be running the install command on other node as

$ php installer.phar install --application-only

Disable application tasks on other nodes

The application schedule tasks are supposed to run only on the main node.

So follow the step on all other nodes:

  1. Go to Task Scheduler
  2. Select Jadu from the left pane list, this should show all the Jadu related scheduled task
  3. Select all the task other than JaduIISConfigupdater and disable them

Setting up Jadu Cluster sync

The following steps should be done all web node

  1. Create a new user jadu_ftp user
  2. Go to IIS and select the main server
  3. Select FTP Firewall Support
  4. Set Data Channel port range to 2000-2100
  5. Apply the changes by clicking the apply on the right pane
  6. Go back to main server and right click and select Add FTP Site
  7. In Add FTP Site dialog box, give a unique name to the site like wincms_ftp for FTP Site Name and Select the Jadu install path on the Physical Path and click Next
  8. In Binding and SSL setting page, select Allow SSL and select your SSL certificate for the site and leave all others as it is and click Next
  9. In Authentication and Authorization information dialog select Basic Authentication type. Under Authorization select Allow access to Specific Users and in the below text box specify the jadu_ftp user . Select both Read and Write permissions and click Finish
  10. Now you can see a new FTP site on your IIS
  11. Go to your finder and select you base installation path and add permission to the folder so that jadu_ftp user has access to read, write and modify.
  12. Now go to config directory of the installation path and make a copy of clustersync.xml.example file and name it as clustersync.xml in the same directory.
  13. Restart FTP services in Services.msc
  14. Update the serverAddress to the IP address of current node
  15. Update the servers with list of the all webnode IPs with the ftp username and password appropriately
  16. The attribute multimedia should be set to 1 only for the main node where the scheduled task is set to run

Setting up shared application cache and session

To set the application to use Memurai for the session, update the php.ini file

session.save_handler = redis
session.save_path = tcp://{redis-host}:{redis-port}

To set the application to use Memurai for the cache, update the node cache_data_store in config/system.xml to use Memurai instead of files.

<cache_data_store>redis</cache_data_store>

In config/datastore.xml, update the connection details in the server node of the Redis block:

<?xml version="1.0" encoding="utf-8" ?>
<datastore xmlns:config="http://www.jadu.co.uk/schema/config">
<redis>
<servers>
<server host="1.2.3.4" port="6379"/>
</servers>
</redis>
</datastore>

Troubleshooting

If your architecture is load balanced, and you are experiencing timeout issues, then the recommendation is you increase the timeout.

To increase the timeout you have to do it in two places:

  • Update the max_execution_time in php.ini to 120
  • Update the fast cgi execution to 120, to do it go to IIS select the main server, click the FastCGI Settings. You can see the the php-cgi.exe entry, right click the entry and select edit and change the Activity Timeout in the dialog box to 120
  • Now restart the IIS server