Replicante Core comes as a single binary with configurable components.
Some components provide optional functionality.
The grafana
component for example only provides the endpoints used for
Grafana annotations
and can be disabled if the functionality provided is not useful to the user.
By default, all components are enabled on all nodes. The exception are components providing experimental or deprecated functionality.
As a result of these defaults, Replicante Core runs as a uniform deployment: each node is equivalent to all other nodes and capable of performing the same functions.
The main advantage of a uniform deployment is simplicity:
This simplicity comes at a cost:
Another very common deployment configuration is based on separating the API servers from other components in the system. This protects the system from expensive API requests and ensures that API requests are not effected by expensive system operations.
To deploy dedicated API servers two “roles” are created by using different configurations for each role. Most options are the same across both roles so only the different parts are shown here.
For the “API server” role use the following configuration:
components:
_default: false # Disable all components not explicitly listed.
grafana: true # Optionally enable the grafana annotations API too.
webui: true
For the “system server” role, the one running all non-API components, use the following configuration:
components:
_default: true # Enable all components not explicitly listed.
grafana: false # Disable grafana annotations API.
webui: false # Disable the WebUI API.
While this approach isolates API requests from all other system functionality it does not address any of the other limitations of a uniform deployment.
The approach of dedicated roles can be extended from API vs everything else to the extreme of a role for each component.
It is time to mention that replicante also has a workers
component that runs asynchronous tasks.
To pick which tasks a node should be working on the task_workers.*
configuration options
can be used in a similar way to components.*
.
To define a role for a component use the following configuration snippet:
components:
_default: false
<COMPONENT>: true
For task worker roles use the following configuration snippet:
components:
_default: false
workers: true
task_workers:
_default: false # Disable processing of tasks not explicitly enabled.
<TASK_TYPE>: true
While such a diverse deployment requires more effort to manage it does have several advantages:
From the configuration snippets above is should be clear that a spectrum of deployments is possible. Users are free to configure different nodes to best fit their needs.
To ensure that all required components are configured and available somewhere in the cluster Replicante Core exposes metrics for which components are enabled on each node.
The following prometheus queries can aid operators monitor components and task workers across all nodes in a Replicante Core cluster:
sum(replicore_components_enabled{type="required"}) by (component)
: should be >= 1
for each component
.sum(replicore_workers_enabled) by (worker)
: should be >= 1
for each task worker
.There is also a query to check optional components:
sum(replicore_components_enabled{type="optional"}) by (components)
.
Users that would like to make use of optional features should ensure that components providing
such features are available somewhere in the cluster.