fix(limiter): add default connection limiter for listeners
This commit is contained in:
parent
b14998ea7f
commit
d13055be43
|
@ -1,11 +1,13 @@
|
||||||
listeners.tcp.default {
|
listeners.tcp.default {
|
||||||
bind = "0.0.0.0:1883"
|
bind = "0.0.0.0:1883"
|
||||||
max_connections = 1024000
|
max_connections = 1024000
|
||||||
|
limiter.connection = default
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners.ssl.default {
|
listeners.ssl.default {
|
||||||
bind = "0.0.0.0:8883"
|
bind = "0.0.0.0:8883"
|
||||||
max_connections = 512000
|
max_connections = 512000
|
||||||
|
limiter.connection = default
|
||||||
ssl_options {
|
ssl_options {
|
||||||
keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
||||||
certfile = "{{ platform_etc_dir }}/certs/cert.pem"
|
certfile = "{{ platform_etc_dir }}/certs/cert.pem"
|
||||||
|
@ -16,12 +18,14 @@ listeners.ssl.default {
|
||||||
listeners.ws.default {
|
listeners.ws.default {
|
||||||
bind = "0.0.0.0:8083"
|
bind = "0.0.0.0:8083"
|
||||||
max_connections = 1024000
|
max_connections = 1024000
|
||||||
|
limiter.connection = default
|
||||||
websocket.mqtt_path = "/mqtt"
|
websocket.mqtt_path = "/mqtt"
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners.wss.default {
|
listeners.wss.default {
|
||||||
bind = "0.0.0.0:8084"
|
bind = "0.0.0.0:8084"
|
||||||
max_connections = 512000
|
max_connections = 512000
|
||||||
|
limiter.connection = default
|
||||||
websocket.mqtt_path = "/mqtt"
|
websocket.mqtt_path = "/mqtt"
|
||||||
ssl_options {
|
ssl_options {
|
||||||
keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
||||||
|
@ -34,6 +38,7 @@ listeners.wss.default {
|
||||||
# enabled = false
|
# enabled = false
|
||||||
# bind = "0.0.0.0:14567"
|
# bind = "0.0.0.0:14567"
|
||||||
# max_connections = 1024000
|
# max_connections = 1024000
|
||||||
|
# limiter.connection = default
|
||||||
# keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
# keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
||||||
# certfile = "{{ platform_etc_dir }}/certs/cert.pem"
|
# certfile = "{{ platform_etc_dir }}/certs/cert.pem"
|
||||||
#}
|
#}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
limiter {
|
||||||
|
connection {
|
||||||
|
rate = "1000/s"
|
||||||
|
bucket {
|
||||||
|
default {
|
||||||
|
rate = "1000/s"
|
||||||
|
capacity = 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue