1、镜像下载启动
docker-compose up -d tb-perf-test
version: '3.8'
services:
tb-perf-test:
image: thingsboard/tb-ce-performance-test:latest
container_name: tb-perf-test
environment:
# 内网地址 ifconfig查看
- REST_URL=http://172.17.0.1:18080
- MQTT_HOST=172.17.0.1
# 多少个设备
- DEVICE_END_IDX=30
# 每秒钟产生多少个遥测数据
- MESSAGES_PER_SECOND=30
# 每秒产生报警数量
- ALARMS_PER_SECOND=10
# 持续时间86400 = 1 天
- DURATION_IN_SECONDS=86400
# 是否创建设备
- DEVICE_CREATE_ON_START=true
# MQTT地址
- MQTT_HOST=localhost
# MQTT端口
- MQTT_PORT=11883
network_mode: host
restart: no
# tdin_open: true 和 tty: true:等价于 -it,它们保持容器的交互性。
stdin_open: true
tty: true
2、官方性能测试
文档地址:
ThingsBoard Performance on different AWS instances | ThingsBoard社区版
最终推荐使用Cassandra +Kafka + Postgres