From 23010e632184da9e82902251a5c1fbf48c1ef7f9 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 3 May 2020 18:00:40 +0300 Subject: [PATCH] docs/Cluster-VictoriaMetrics.md: add `Multitenancy` chapter --- docs/Cluster-VictoriaMetrics.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 8da3da0e7..5958416fb 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -36,6 +36,25 @@ It increases cluster availability, simplifies cluster maintenance and cluster sc +## Multitenancy + +VictoriaMetrics cluster supports multiple isolated tenants (aka namespaces). +Tenants are identified by `accountID` or `accountID:projectID`, which are put inside request urls. +See [these docs](#url-format) for details. Some facts about tenants in VictoriaMetrics: + +* Each `accountID` and `projectID` is identified by an arbitrary 32-bit integer in the range `[0 .. 2^32)`. +If `projectID` is missing, then it is automatically assigned to `0`. It is expected that other information about tenants +such as auth tokens, tenant names, limits, accounting, etc. is stored in a separate relational database. This database must be managed +by a separate service sitting in front of VictoriaMetrics cluster. + +* Tenants are automatically created when the first data point is written into the given tenant. + +* Data for all the tenants is evenly spread among available `vmstorage` nodes. This guarantees even load among `vmstorage` nodes +when different tenants have different amounts of data and different query load. + +* VictoriaMetrics doesn't support querying multiple tenants in a single request. + + ## Binaries Compiled binaries for cluster version are available in the `assets` section of [releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases). @@ -145,7 +164,8 @@ or [an alternative dashboard for VictoriaMetrics cluster](https://grafana.com/gr ### URL format * URLs for data ingestion: `http://:8480/insert//`, where: - - `` is an arbitrary number identifying namespace for data ingestion (aka tenant) + - `` is an arbitrary 32-bit integer identifying namespace for data ingestion (aka tenant). It is possible to set it as `accountID:projectID`, + where `projectID` is also arbitrary 32-bit integer. If `projectID` isn't set, then it equals to `0`. - `` may have the following values: - `prometheus` - for inserting data with [Prometheus remote write API](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write) - `influx/write` or `influx/api/v2/write` - for inserting data with [Influx line protocol](https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/)