How the load balancing works
Smart and automatic load balancing
Shinken is able to cut the user configuration into parts and dispatch them to schedulers. The load balancing is done automaticaly : the administrator doesn’t need to remember which hosts are linked with other one to create packs, Shinken does it for him.
The dispatch is a host based one : that means all services of a host will be in the same scheduler than this host. The major avantage of Shinken is the ability to create independants configurations : an element of a configuration will not have to call a element from another pack. That means the administrator doesn’t need to know all relations betweens elements like parents, hostdependancies or services dependancies : Shinken is able to look at theses relations and put theses related elements into the same packs.
This action is done in two parts:
- create independant packs of elements
- paste packs to create N configurations for the N schedulers
Creating independants packs
The cutting action is done by looking at two elements : hosts and services. Services are linked with their hosts so they will be in the same pack. Others relations are taken into account :
- parent relationshinp for hosts (like a distant server and it’s router)
- hostdependancies
- servicesdependancies
Shinken look at all these relations and creates a graph with it. A graph is a relation pack. This can be illustrated by the following picture :
In this example, we will have two packs:
- pack 1 : Host-1 to host-5 and all theirs services
- pack 2 : Host-6 to Host-8 and all theirs services
The packs agreagations into scheduler configurations
When all relation packs are created, the Arbiter agregate them info N configurations if the administrator have defined N active schedulers (no spare). Packs are agregate into configurations (it’s like “Big packs”). The dispatch looks at the weight property of schedulers : the higer weight the scheduler have, the more packs it will have.
This can be show in the folowing picture :
The configurations sending to satellites
When all configurations created, the Arbiter sends them to the N active schedulers. It also creatse configurations for satellites (pollers, reactionners and brokers) with links to schedulers so they know where to get jobs to do. After sending the configuration, the Arbiter begins to watch for orders from the users and checks if satellites are still alive.

