Skip to content
Anthony Lapenna edited this page Jun 14, 2015 · 7 revisions

CPU

1. central-core

This component must poll values from the metrics components and the service registry.

It retrieves node and service definitions from the service registry and check if the user-defined rules are triggered.

A rule is a set of one or more metrics conditions (such as service frontend requests / sec > 30000) and a specific action (such as upscale with 5 more nodes).

This component is able to take the following decisions:

  • Upscale a service
  • Downscale a service

In order to take these decisions, it must gather the following metrics:

  • Number of nodes associated to the service
  • Requests/sec on the service frontend
  • (Average response time of request against the service)

Upon starting, this component needs to register against the following hosts:

  • a service registry component (such as Consul) to be able to list the running services
  • a metric component (such as Prometheus), to be able to query metrics for a specific service

If these components cannot be reach (timeout), the application must fail to start.

Optionally, this component can register genisys hosts to list the available datacenters for rules creations. If no genisys components are available, the central-core component will not be able to send any action (read-only mode). More genisys components can be registered at runtime using the /genisys endpoint.

Genisys components management

Endpoints exposed to manage associated genisys components:

  • /genisys/register
  • /genisys/<genisys_id>/deregister

Decisions

This component is able to take the following decisions:

  • Scale a service depending on metrics

2. genisys

This component exposes multiple endpoints.

vocabulary

  • service

A service is defined by a hostname and a port.

  • datacenter

A datacenter must be associated to a compute backend (Docker, AWS, Openstack, Google cloud platform...).

service management

  • /service/<service_name>/scale

This endpoint allows genisys to scale (up/down) a specific service. It expects a POST request with the following data:

{
	"scale": scale_value,
	"datacenter": "",
}

Parameters:

  • scale_value (numeric value): The service should be up-scaled if scale_value > 0 and down-scaled if scale_value < 0.
  • datacenter (string value): Defines a specific datacenter in which the scale action will be triggered for the service. If this parameter is not specified, genisys must be able to determine in which datacenter(s) the scale order will be triggered.

compute management

  • /compute/register

This endpoint allows genisys to register a datacenter.

  • /compute/<compute_name>/deregister

This endpoint allows genisys to deregister a specific datacenter.

Decisions

This component is able to take the following decisions:

  • Find the most suited compute to scale a service

Actions

  • Scale (up/down) a service
Clone this wiki locally