Open shuvigoss opened 5 years ago
influx-proxy 主要是用来做分片,对于数据按照MEASUREMENTS做分片存储
influxdb-relay 主要是用来做双写,数据备份
influx-proxy
influxdb-relay
饿了吗架构
siege -c10 -r1000 "http://127.0.0.1:18086/query?db=test&q=select * from cpu" Transactions: 10000 hits Availability: 100.00 % Elapsed time: 17.86 secs Data transferred: 1.71 MB Response time: 0.02 secs Transaction rate: 559.91 trans/sec Throughput: 0.10 MB/sec Concurrency: 9.69 Successful transactions: 10000 Failed transactions: 0 Longest transaction: 0.31 Shortest transaction: 0.00
siege -c20 -r1000 "http://127.0.0.1:18086/query?db=test&q=select * from cpu" Transactions: 20000 hits Availability: 100.00 % Elapsed time: 59.33 secs Data transferred: 3.41 MB Response time: 0.06 secs Transaction rate: 337.10 trans/sec Throughput: 0.06 MB/sec Concurrency: 19.41 Successful transactions: 20000 Failed transactions: 0 Longest transaction: 4.54 Shortest transaction: 0.00
siege -c30 -r1000 "http://127.0.0.1:18086/query?db=test&q=select * from cpu" Transactions: 30000 hits Availability: 100.00 % Elapsed time: 80.32 secs Data transferred: 5.12 MB Response time: 0.08 secs Transaction rate: 373.51 trans/sec Throughput: 0.06 MB/sec Concurrency: 29.17 Successful transactions: 30000 Failed transactions: 0 Longest transaction: 4.52 Shortest transaction: 0.00
siege -c40 -r1000 "http://127.0.0.1:18086/query?db=test&q=select * from cpu" Transactions: 39622 hits Availability: 99.06 % Elapsed time: 107.56 secs Data transferred: 6.76 MB Response time: 0.10 secs Transaction rate: 368.37 trans/sec Throughput: 0.06 MB/sec Concurrency: 37.33 Successful transactions: 39622 Failed transactions: 378 Longest transaction: 13.68 Shortest transaction: 0.00
siege -c10 -r1000 "http://127.0.0.1:18086/write?db=test POST cpu,host=server02,region=uswest value=1 1434055561000000000" Transactions: 10000 hits Availability: 100.00 % Elapsed time: 16.58 secs Data transferred: 0.00 MB Response time: 0.02 secs Transaction rate: 603.14 trans/sec Throughput: 0.00 MB/sec Concurrency: 9.71 Successful transactions: 10000 Failed transactions: 0 Longest transaction: 0.20 Shortest transaction: 0.00
siege -c20 -r1000 "http://127.0.0.1:18086/write?db=test POST cpu,host=server02,region=uswest value=1 1434055561000000000" Transactions: 20000 hits Availability: 100.00 % Elapsed time: 61.67 secs Data transferred: 0.00 MB Response time: 0.06 secs Transaction rate: 324.31 trans/sec Throughput: 0.00 MB/sec Concurrency: 19.41 Successful transactions: 20000 Failed transactions: 0 Longest transaction: 12.11 Shortest transaction: 0.01
siege -c30 -r1000 "http://127.0.0.1:18086/write?db=test POST cpu,host=server02,region=uswest value=1 1434055561000000000" Transactions: 30000 hits Availability: 100.00 % Elapsed time: 81.94 secs Data transferred: 0.00 MB Response time: 0.08 secs Transaction rate: 366.12 trans/sec Throughput: 0.00 MB/sec Concurrency: 29.35 Successful transactions: 30000 Failed transactions: 0 Longest transaction: 23.56 Shortest transaction: 0.00
siege -c40 -r1000 "http://127.0.0.1:18086/write?db=test POST cpu,host=server02,region=uswest value=1 1434055561000000000" Transactions: 39515 hits Availability: 98.79 % Elapsed time: 103.60 secs Data transferred: 0.00 MB Response time: 0.09 secs Transaction rate: 381.42 trans/sec Throughput: 0.00 MB/sec Concurrency: 35.43 Successful transactions: 39515 Failed transactions: 485 Longest transaction: 15.37 Shortest transaction: 0.01
TPS (2个influxdb Docker 实例)
场景 | 10C | 20C | 30C | 40C |
---|---|---|---|---|
influxdb读 | 559.91 | 337.1 | 373.51 | 368.37 |
influxdb写 | 603.14 | 324.31 | 366.12 | 381.42 |
influxdb-relay | 256.67 | 204.33 | 176.22 | 164.33 |
安装influxdb
docker pull influxdb:1.5.4 docker run --name influxdb1 -p 18086:8086 -d influxdb:1.5.4 docker run --name influxdb2 -p 18087:8086 -d influxdb:1.5.4
influx-proxy VS influxdb-relay