Merge branch 'master' of github.com:emqtt/emqtt
This commit is contained in:
commit
48fa56e734
55
README.md
55
README.md
|
@ -42,11 +42,60 @@ eMQTT requires Erlang R17+.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
......
|
### etc/app.config
|
||||||
|
|
||||||
## Admin and Cluster
|
```
|
||||||
|
{emqtt, [
|
||||||
|
{auth, {anonymous, []}}, %internal, anonymous
|
||||||
|
{listen, [
|
||||||
|
{mqtt, 1883, [
|
||||||
|
{max_conns, 1024},
|
||||||
|
{acceptor_pool, 4}
|
||||||
|
]},
|
||||||
|
{http, 8883, [
|
||||||
|
{max_conns, 512},
|
||||||
|
{acceptor_pool, 1}
|
||||||
|
]}
|
||||||
|
]}
|
||||||
|
]}
|
||||||
|
|
||||||
......
|
```
|
||||||
|
|
||||||
|
### etc/vm.args
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
-sname emqtt
|
||||||
|
|
||||||
|
-setcookie emqtt
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
When nodes clustered, vm.args should be configured as below:
|
||||||
|
|
||||||
|
```
|
||||||
|
-name emqtt@host1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cluster
|
||||||
|
|
||||||
|
Suppose we cluster two nodes on 'host1', 'host2', Steps:
|
||||||
|
|
||||||
|
on 'host1':
|
||||||
|
|
||||||
|
```
|
||||||
|
./bin/emqtt start
|
||||||
|
```
|
||||||
|
|
||||||
|
on 'host2':
|
||||||
|
|
||||||
|
```
|
||||||
|
./bin/emqtt start
|
||||||
|
|
||||||
|
./bin/emqtt_ctl cluster emqtt@host1
|
||||||
|
```
|
||||||
|
|
||||||
|
Run './bin/emqtt_ctl cluster' on 'host1' or 'host2' to check cluster nodes.
|
||||||
|
|
||||||
## HTTP API
|
## HTTP API
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue