From 445ee73fa9632e47a614a049015a2d48468363cd Mon Sep 17 00:00:00 2001 From: Gibbs Cullen <59837500+gibbscullen@users.noreply.github.com> Date: Mon, 23 Mar 2020 13:33:17 -0400 Subject: [PATCH] [docs] How to write to multiple M3DB clusters (#2187) * added new remote write params * added link to prom params * adding section for multiple m3db clusters * first round of edits made * small edits and additions * formatting changes * final changes * nit --- .../multiple_m3db_clusters.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/operational_guide/multiple_m3db_clusters.md diff --git a/docs/operational_guide/multiple_m3db_clusters.md b/docs/operational_guide/multiple_m3db_clusters.md new file mode 100644 index 0000000000..1d9d1e0eca --- /dev/null +++ b/docs/operational_guide/multiple_m3db_clusters.md @@ -0,0 +1,93 @@ +## Write to multiple M3DB clusters via m3coordinator + +### Overview: + +Default M3 architecture has the m3coordinator writing to and aggregating metrics from a single M3DB cluster. To map a single coordinator to more than one M3DB cluster, follow the below instructions. + +Use case(s): +- Sending metrics to different namespaces for different retention periods, etc. + +### Instructions: + +1. Add `clusterManagement` to config file to add multiple M3BD clusters to m3coordinator: + +Example config file with `clusterManagement` (see end of the config): + +```bash +clusters: + # Should match the namespace(s) set up in the DB nodes + - namespaces: + - namespace: 21d + retention: 504h + type: unaggregated + client: + config: + service: + env: default_env + zone: embedded + service: m3db + cacheDir: /data/m3kv_default + etcdClusters: + - zone: embedded + endpoints: + - + - + - + writeRetry: + initialBackoff: 500ms + backoffFactor: 3 + maxRetries: 2 + jitter: true + fetchRetry: + initialBackoff: 500ms + backoffFactor: 2 + maxRetries: 3 + jitter: true + - namespaces: + - namespace: 90d + retention: 2160h + type: aggregated + resolution: 10m + - namespace: 500d + retention: 12000h + type: aggregated + resolution: 1h + client: + config: + service: + env: lts_env + zone: embedded + service: m3db + cacheDir: /data/m3kv_lts + etcdClusters: + - zone: embedded + endpoints: + - + - + - + writeRetry: + initialBackoff: 500ms + backoffFactor: 3 + maxRetries: 2 + jitter: true + fetchRetry: + initialBackoff: 500ms + backoffFactor: 2 + maxRetries: 3 + jitter: true +tagOptions: + idScheme: quoted +clusterManagement: + etcd: + env: default_env + zone: embedded + service: m3db + cacheDir: /data/m3kv_default + etcdClusters: + - zone: embedded + endpoints: + - + - + - +``` +2. Use the `Cluster-Environment-Name` header for any API requests to the m3coordinator. \ No newline at end of file