Przeglądaj źródła

fix(http): connector and authn/authz http `keep-alive` default 30s , max 1000

JimMoen 4 lat temu
rodzic
commit
ff68e2a20f

+ 1 - 1
apps/emqx_authn/src/simple_authn/emqx_authn_http.erl

@@ -223,7 +223,7 @@ default_headers_no_content_type() ->
     #{ <<"accept">> => <<"application/json">>
      , <<"cache-control">> => <<"no-cache">>
      , <<"connection">> => <<"keep-alive">>
-     , <<"keep-alive">> => <<"timeout=5">>
+     , <<"keep-alive">> => <<"timeout=30, max=1000">>
      }.
 
 transform_header_name(Headers) ->

+ 1 - 1
apps/emqx_authz/src/emqx_authz_api_schema.erl

@@ -112,7 +112,7 @@ default_headers_no_content_type() ->
     #{ <<"accept">> => <<"application/json">>
      , <<"cache-control">> => <<"no-cache">>
      , <<"connection">> => <<"keep-alive">>
-     , <<"keep-alive">> => <<"timeout=5">>
+     , <<"keep-alive">> => <<"timeout=30, max=1000">>
      }.
 
 transform_header_name(Headers) ->

+ 1 - 1
apps/emqx_authz/src/emqx_authz_schema.erl

@@ -195,7 +195,7 @@ default_headers_no_content_type() ->
     #{ <<"accept">> => <<"application/json">>
      , <<"cache-control">> => <<"no-cache">>
      , <<"connection">> => <<"keep-alive">>
-     , <<"keep-alive">> => <<"timeout=5">>
+     , <<"keep-alive">> => <<"timeout=30, max=1000">>
      }.
 
 transform_header_name(Headers) ->

+ 1 - 1
apps/emqx_connector/src/emqx_connector_http.erl

@@ -159,7 +159,7 @@ on_start(InstId, #{base_url := #{scheme := Scheme,
                , {connect_timeout, ConnectTimeout}
                , {retry, MaxRetries}
                , {retry_timeout, RetryInterval}
-               , {keepalive, 5000}
+               , {keepalive, 30000}
                , {pool_type, PoolType}
                , {pool_size, PoolSize}
                , {transport, Transport}