Comments (5)
you can do it just like this
version: '3'
services:
emqx1:
image: emqx/emqx:4.4.10
container_name: emqx_node1
restart: always
environment:
- "EMQX_NAME=emqx"
- "EMQX_HOST=node1.emqx.io"
- "EMQX_CLUSTER__DISCOVERY=static"
- "[email protected],[email protected],[email protected]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
networks:
emqx-bridge:
ipv4_address: '10.0.0.2'
aliases:
- node1.emqx.io
emqx2:
image: emqx/emqx:4.4.10
container_name: emqx_node2
restart: always
environment:
- "EMQX_NAME=emqx"
- "EMQX_HOST=node2.emqx.io"
- "EMQX_CLUSTER__DISCOVERY=static"
- "[email protected],[email protected],[email protected]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
networks:
emqx-bridge:
ipv4_address: '10.0.0.3'
aliases:
- node2.emqx.io
emqx3:
image: emqx/emqx:4.4.10
container_name: emqx_node3
restart: always
environment:
- "EMQX_NAME=emqx"
- "EMQX_HOST=node3.emqx.io"
- "EMQX_CLUSTER__DISCOVERY=static"
- "[email protected],[email protected],[email protected]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
networks:
emqx-bridge:
ipv4_address: '10.0.0.4'
aliases:
- node3.emqx.io
haproxy:
image: haproxy:2.4
container_name: emqx_haproxy
restart: always
ports:
- 18083:18083
- 1883:1883
- 8083:8083
volumes:
- ./haproxy.cfg:/haproxy.cfg
command: ["haproxy", "-f", "/haproxy.cfg"]
networks:
emqx-bridge:
ipv4_address: '10.0.0.5'
aliases:
- haproxy.emqx.io
networks:
emqx-bridge:
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/24
haproxy.cfg
global
log stdout format raw daemon debug
nbproc 1
nbthread 2
cpu-map auto:1/1-2 0-1
defaults
log global
mode tcp
option tcplog
maxconn 1024000
timeout connect 30000
timeout client 600s
timeout server 600s
frontend emqx_tcp
mode tcp
option tcplog
bind *:1883
default_backend emqx_tcp_back
backend emqx_tcp_back
mode tcp
server emqx1 node1.emqx.io:1883
server emqx2 node2.emqx.io:1883
server emqx3 node3.emqx.io:1883
frontend frontend_emqx_dashboard
bind *:18083
option tcplog
mode tcp
default_backend backend_emqx_dashboard
backend backend_emqx_dashboard
mode tcp
balance roundrobin
server emqx1 node1.emqx.io:18083
server emqx2 node2.emqx.io:18083
server emqx3 node3.emqx.io:18083
frontend frontend_emqx_ws
bind *:8083
option tcplog
mode tcp
default_backend backend_emqx_ws
backend backend_emqx_ws
mode tcp
balance roundrobin
server emqx1 node1.emqx.io:8083
server emqx2 node2.emqx.io:8083
server emqx3 node3.emqx.io:8083
from emqtt-bench.
may be docker network set problem,run this command
docker network ls
then you will see an doggy_emqx-bridge docker network,you need rm this
docker network rm doggy_emqx-bridge
At last
docker-compose up -d
from emqtt-bench.
@607qwq
Thanks but I encounter this error after applying your update for docker-compose.yml and haproxy.cfg.
Trying to look up by docker logs <container ID>
but nothing show up.
from emqtt-bench.
Thanks it works!
May I ask whatpub_overrun
means?
It does receive the message but why pub_overrun
?
Thanks:)
from emqtt-bench.
@607qwq problem solved, thanks
from emqtt-bench.
Related Issues (20)
- ssh终端关掉就mqtt连接自动退出了,无法在后台运行 HOT 3
- 最新源码编译最低要求23.2
- error:~/emqtt-bench$ make /home/deploy/emqtt-bench/scripts/ensure-rebar3.sh 3.19.0-emqx-1 /home/deploy/emqtt-bench/rebar3 compile /usr/bin/env: ‘escript’: No such file or directory Makefile:12: recipe for target 'compile' failed make: *** [compile] Error 127 HOT 23
- exception exit: econnrefused HOT 1
- Problem with ./emqtt_bench conn HOT 2
- Sometimes the `-c` is not work HOT 2
- Getting connect error - eaddrnotavail HOT 1
- window 上应该如何运行此工具 HOT 1
- 0.4.12 and 0.4.13 no bin and escript directories.
- Instead of username+password, how to use clientId+password with emqtt-bench?
- bench script start error HOT 1
- IPv6 support HOT 2
- docker build error HOT 1
- print receive message when run benchmark
- How to define payload content?
- Parameter setting of ca certificate is not supported HOT 1
- Mismatched payload makes emqttbench crash HOT 2
- 980 connection limit HOT 2
- add the option of Reconnect in readme
- client(43769): connect error - {tcp_closed,#Port<0.99717>} client(43769): EXIT for {shutdown,tcp_closed}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emqtt-bench.