influxdb高可用层InfluxDB Relay使用入门

前言:基本高可用层relay架构图:

图中负载设备(load Balancer)常用nginx,对于读请求直接转发到inflxudb,对于写请求转发到relay

图中是通过地址转发,也可以通过域名来转发

influxdb高可用层InfluxDB Relay使用入门_第1张图片

 

 

1.安装golang环境

2.下载编译influxdb-relay

https://github.com/influxdata/influxdb-relay

3.编辑配置文件relay.toml

[[http]]
name = "influxdb-http"
bind-addr = "0.0.0.0:9096"
output = [
    { name="influxdb1", location="http://10.200.9.240:8086/write", timeout="10s", buffer-size-mb=1024 },
    { name="influxdb2", location="http://10.200.10.233:8086/write", timeout="10s", buffer-size-mb=1024 },
]

[[udp]]
name = "influxdb-udp"
bind-addr = "0.0.0.0:9096"
read-buffer = 0 # default
output = [
    { name="influxdb1", location="10.200.9.240:8089", mtu=1024 },
    { name="influxdb2", location="10.200.10.233:8089", mtu=1024 },
]

4.运行:

nohup ./influxdb-relay -config relay.toml &

 

你可能感兴趣的:(influxdb)