diff --git a/etc/emqx.conf b/etc/emqx.conf index df3be2a9a..bebefadf0 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -303,6 +303,11 @@ rpc.tcp_server_port = 5369 ## Value: Port [1024-65535] rpc.tcp_client_port = 5369 +## Number of utgoing RPC connections. +## +## Value: Interger [1-256] +rpc.tcp_client_num = 32 + ## RCP Client connect timeout. ## ## Value: Seconds @@ -338,6 +343,21 @@ rpc.socket_keepalive_interval = 75s ## Value: Integer rpc.socket_keepalive_count = 9 +## Size of TCP send buffer. +## +## Value: Bytes +rpc.socket_sndbuf = 1MB + +## Size of TCP receive buffer. +## +## Value: Seconds +rpc.socket_recbuf = 1MB + +## Size of user-level software socket buffer. +## +## Value: Seconds +rpc.socket_buffer = 1MB + ##-------------------------------------------------------------------- ## Log ##-------------------------------------------------------------------- diff --git a/priv/emqx.schema b/priv/emqx.schema index 1d308476d..9d2896713 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -350,6 +350,13 @@ end}. {datatype, integer} ]}. +%% Default TCP port for outgoing connections +{mapping, "rpc.tcp_client_num", "gen_rpc.tcp_client_num", [ + {default, 32}, + {datatype, integer}, + {validators, ["range:gt_0_lt_256"]} +]}. + %% Client connect timeout {mapping, "rpc.connect_timeout", "gen_rpc.connect_timeout", [ {default, "5s"}, @@ -392,6 +399,28 @@ end}. {datatype, integer} ]}. +%% Size of TCP send buffer +{mapping, "rpc.socket_sndbuf", "gen_rpc.socket_sndbuf", [ + {default, "1MB"}, + {datatype, bytesize} +]}. + +%% Size of TCP receive buffer +{mapping, "rpc.socket_recbuf", "gen_rpc.socket_recbuf", [ + {default, "1MB"}, + {datatype, bytesize} +]}. + +%% Size of TCP receive buffer +{mapping, "rpc.socket_buffer", "gen_rpc.socket_buffer", [ + {default, "1MB"}, + {datatype, bytesize} +]}. + +{validator, "range:gt_0_lt_256", "must greater than 0 and less than 256", + fun(X) -> X > 0 andalso X < 256 end +}. + %%-------------------------------------------------------------------- %% Log %%--------------------------------------------------------------------