shell909090/influx-proxy

数据现在只写到同端口的实例上

Opened this issue · 3 comments

请问 backends 里的多个实例。怎么将数据写到另一个实例,现在我只能写到一个实例8087,8086 没有数据,但是数据库在4个实例都有,现在measurements只有在8087上的实例有。
"circles": [
{
"name": "circle-1",
"backends": [
{
"name": "influxdb-1-1",
"url": "http://10.105.1.181:8086",
"username": "admin",
"password": "xiebin1204",
"auth_secure": false
},
{
"name": "influxdb-1-2",
"url": "http://10.105.1.181:8087",
"username": "admin",
"password": "xiebin1204",
"auth_secure": false
}
]
},
{
"name": "circle-2",
"backends": [
{
"name": "influxdb-2-1",
"url": "http://10.105.1.180:8086",
"username": "admin",
"password": "xiebin1204",
"auth_secure": false
},
{
"name": "influxdb-2-2",
"url": "http://10.105.1.180:8087",
"username": "admin",
"password": "xiebin1204",
"auth_secure": false
}

curl -X POST "http://127.0.0.1:7076/query?u=admin&p=xiebin1204" --data-urlencode 'q=CREATE DATABASE test WITH DURATION 1d REPLICATION 1 SHARD DURATION 1h NAME "liquid"'

measurements里配多个backends。

@xxx1204 proxy是按照分库进行设计的,同一组db和measurement,只会往每个circle中的一个influxdb写,你可以多试几个不同的measurement,就会分配到8086的实例上。
不同circle之间的数据是相互备份的关系