Document Stats scheduler better including AF and drivers

Change-Id: I83ab54d3b120404acf69539997a905eafcfd8fa5
This commit is contained in:
Endre Karlson 2013-09-25 00:28:43 +02:00
parent b34307249d
commit 95168cb337
4 changed files with 105 additions and 2 deletions

View File

@ -9,4 +9,5 @@ Libra Admin API Server
about
config
schedulers
stats-drivers
api

View File

@ -14,15 +14,39 @@ Stats Scheduler
This scheduler is actually a monitoring scheduler and at a later date will also
gather statistics for billing purposes. It is executed once a minute.
It sends a gearman message to active Load Balancer device. There are three
It sends a gearman 'ping' message to active Load Balancer device. There are three
possible outcomes from the results:
It has support for multiple different :doc:`stats-drivers`.
#. If all is good, no action is taken
#. If a node connected to a load balancer has failed the node is marked as
ERROR and the load balancer is marked as DEGRADED
#. If a device has failed the device will automatically be rebuilt on a new
device and the associated floating IP will be re-pointed to that device. The
old device will be marked for deletion
old device will be marked for deletion.
Rebuild (AutoFailover)
**********************
Libra LBaaS supports auto-failover or auto-rebuild of a broken :term:`device`.
This basically means typically re-allocating / re-building the :term:`device` to a new :term:`device`.
# A ping is sent to each :term:`device` (ping_lbs > _exec_ping)
# Send failures to drivers (_exec_ping > _send_fails)
# Driver does
# Marks the :term:`device` as being in ERROR state.
# Triggers a rebuild
# Looks for a free :term:`device` that is in OFFLINE state in the db.
# Assigns the failed :term:`device` to the OFFLINE :term:`device`
# Assigns the :term:`vip` to the new :term:`device`
# Marks :term:`device` as DELETED
# Puts the new :term:`device` into ACTIVE in the db.
# A scheduled function remove the :term:`device` from DB and unconfigures it.
# A scheduled function ensures that there are standby :term:`device`s in the pool.
Delete Scheduler
----------------

View File

@ -0,0 +1,67 @@
.. stats-drivers:
=============
Stats Drivers
=============
The Stats scheduler has support for multiple different drivers.
A typical driver has support for 3 different things:
* Sending a alert
* Sending a change
* Sending a delete
One can divide what a driver does into different areas:
* Alerting - Example Datadog
* Remediation - example: Database
* Stats - Example Datadog
Dummy
-----
A dummy driver which simply logs the above actions.
Database
--------
This is not a typical driver. It provides functionality such as triggering
rebuilds of failed devices, marking devices as deleted and changing node states in
the db.
Alert
*****
When receiving a alert it does the following:
# Marks the node with ERROR in the database
# Triggers a rebuild of the device (AutoFailover / AF)
Delete
******
Marks the device as DELETED in the Database
Change
******
Change the state of the device in the database
Datadog
-------
A plugin to provide functionality towards http://www.datadoghq.com/ for alerting.
Alert
*****
Send a failure alert up to Datadog
Delete
******
Send a message about a device being down / unreachable.

View File

@ -15,6 +15,17 @@ Glossary
A software that stores data like a SQL server or similar.
device
A Loadbalancer Device which either runs in Software aka
:ref:`libra-worker` with :term:`haproxy` or any other kind of
software / hardware.
vip
A virtual ip is a ip address which is assigned to the :term:`device`
and can be moved around if needed.
gearman
A job system. See http://gearman.org/ for more info.