WebProd - advanced configurations
Summary | This article details a web farm configuration |
Applies to | AskiaWeb |
Written for | IT |
Keywords | webfarm; web farm; configuration; load balancing; NLB |
Network load balancing configuration
Requirements
- The load balancer must feature the possibility to detect a specific parameter from the URL (In WebProd, we use "Intvw") to redirect a same respondent to the same server during a specified persistence time (for example 10 minutes). Without such management, you won't be able to setup a load balanced WebProd.
- 2 or more servers with Windows Server 2008 R2 + installed for use as web server
- SQL Server
- AskiaField v5.3.5 or later (cf WebProd installation manual)
Examples of known compatible load balancers:
- Kemp NLB with "Hash of HTTP Query Item" set as a "Persistence Method" setting
- Barracuda NLB with "URL Parameter" set as a "Persistence Method" setting
Note: At of the time of writing this (August 2017), "NLB" (Microsoft Server's built-in software load-balancer) is not known for accepting this type of setting, therefore making it incompatible with a load-balanced WebProd farm.
Configuration
Configuration of the web server
- Add both web servers to the domain (if necessary) and configure them with a fixed IP-address.
- Install WebProd on both servers. Make identical installs with the exact same installation path’s.
- Configure WebProd (http://[servername]/webprod/pages/pgconnection.asp).
NB : Only one WebProd needs to be configured entirely. The other servers will use the same settings because they link to the same WebProd database.- Go to Configuration > WebProd configuration, and:
- Change the IP in all web path’s with a new one. (Take one unused IP address in the same range of the fixed IP allocated earlier to the web servers. This virtual IP will be used for accessing both web servers)
- 'Store dat’s on SQL Server' has to be selected.
- Set the appropriated connection sting in 'Connection string for interview db'.
Example: Provider=sqloledb; Data Source=SomeServer; Initial Catalog=WebInterviews; Trusted_Connection=no;User Id=[SQL USER ID];Password=[SQL USER PASSWORD];
Setup of Network Load Balancing
- Start the load balancer Manager
- Create a new cluster and use the new virtual IP as Cluster IP address.
- Select a cluster operation mode (Unicast or Multicast).
- Add the second, third, etc. web server to the cluster.
For performance reasons a second network adapter on each server could be recommended. Also read more about Unicast and Multicast if necessary. (unicast: no direct network communication possible between web servers in cluster)
Here are a few recommended configurations on the server-side so that the machine is ready to host a load-balanced farm of WebProd application servers.
Web Farm settings
Dat-files in memory
- To enable dat files in memory, set the 'Timeout interviews in memory' value to a value greater than 0 (in minutes). If a correspondent doesn't respond within the selected time, the interview will be written to disk or SQL server, and removed from memory to free resources.
- If AskiaExt is closed in a 'normal' way (closing windows or IIS-Reset/IIS-Stop) the dat-files will be written to disk/SQL before closing. Naturally, when the server crashes the interviews currently in memory are lost.
If you enable the 'Store Qex in WebProd database' option, the QEX file will be stored in the 'QexFile' Field in the WP_Surveys table in the WebProd database (both with Access and SQL databases).
Note that when you enable this option, it will be impossible to get the active QEX file using the webprod.asp pages (use CCA for that).
If you enable the 'Store Dat's on SQL Server' option, and provide a valid ADO connection string in the 'Connection string for interview db' field, all interviews will be stored in the provided database.
- All necessary tables will be automatically created in the database - one table for each survey (table name = external name).
- If saving the file to the SQL server fails, the file will be written on the 'old' location on disk.
To synchronize the dat-files on SQL server, AND the QEX file, saved in the WebProd database with the ones on disk, you can use the 'Synchronize from disk to database' and 'Synchronize from database to disk' buttons. The first action will save all the dat-files currently on disk in the database overwriting identical files already there, and store the current QEX file in the Askia QES directory of the WebProd database, also overwriting the current file (if any). The second option will do the opposite.