Application Server enables the administrator to define a custom policy for distributing HTTP requests. A custom policy defines the load balancing algorithm that the load balancer plug-in must use. In other words, the Administrator can define which Application Server instance will handle an HTTP request. To use this feature, the administrator needs to develop a shared library, which can, for example, be used to evaluate the headers of incoming requests provided to it and in accordance to some criteria, select the instance that can serve the request. This shared library would be loaded by the load balancer.
The shared library must implement an interface as defined in loadbalancer.h, which is available under appserver_install_dir/lib/install/templates.
Application Server also bundles a sample module roundrobin.c that implements the basic round robin algorithm. The administrator can use this sample module as a template to build the shared library. This sample module is also available under appserver_install_dir/lib/install/templates.