Developer Documentation Library > Interviewer - Server > UNICOM Intelligence Interviewer architecture > Web Service tier > Interview Web Service implementation > Session engine usage
 
Session engine usage
When the Mode configuration property is set to Distributed, the Interview Web Service distributes the requests to create interviews (and for subsequent pages) to multiple session engines. mrIWeb uses a RegisteredEngines.xml file and provides a registration web service that allows engines to be added and removed. The Interview Web Service uses this mrIWeb functionality. mrIWeb must be installed to handle the engine registration and the Interview Web Service monitors for changes in the RegisteredEngines.xml. Monitoring of the RegisteredEngines.xml file is achieved by using the System.IO.FileSystemWatcher class so that changes in engine registration are detected almost immediately.
The Interview Web Service follows the mrIWeb Session Engine load balancing logic. Before starting a new interview, IsActive and PercentLoaded is called on all registered engines to determine the least loaded engine. The interview then startson the least-loaded engine and affinity is set to that engine for subsequent requests. Before each request. IsActive is called to check if it is still available. When an engine fails, the Interview Web Service repeat the IsActive and PercentLoaded checks on all engines and transitions to using the least loaded engine at that time.
See also
Interview Web Service implementation