Webscaler is a script that integrates the creation of virtual machines, in an OpenStack cloud, with the automatic service maintenance in HAProxy load balancer.
This is based on a task, Dynamic cloud-based scaling web-service from a course taken during my master thesis. The basis is to create a solution that adjusts the number of webservers based on the incoming rate of user requests.
This implementation uses the direct integration to OpenStack through its Python Nova library, to maintain virtual machine instances, through their different stages of dynamic creation, stoping, and deletion. The integration to HAProxy is based on the dynamic writing of configuration files (to ensure continuous state), and its socket connection for commands, such as states for draining and stats gathering.
This should not be used in production, as the most important parts of this script has been the integration to OpenStack and HAProxy.
The open sourcing of this is meant to create inspiration, and a private reference for the practices in integrating with the different components.