aboutsummaryrefslogtreecommitdiffstats
path: root/openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2018-02-28 11:10:50 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2018-02-28 11:10:56 +0800
commitd77dc45e7eee74a7c39e850070103fcbbc8f38b0 (patch)
tree42ba2358aa53a99e30d7f493a619a40b67f9ec4a /openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf
parenteba92f2ec4bd3783633fe2408eeae582b811c70a (diff)
Support IP Hash LB policy
Issue-ID: MSB-154 Change-Id: I11b8e3a314c6045183971bf2207b9ccee7df10c2 Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf')
-rw-r--r--openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf/msbinit.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf/msbinit.lua b/openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf/msbinit.lua
index bc8a13f..ec7d7b0 100644
--- a/openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf/msbinit.lua
+++ b/openresty-ext/src/assembly/resources/openresty/nginx/luaext/conf/msbinit.lua
@@ -1,6 +1,6 @@
--[[
- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ Copyright (C) 2018 ZTE, Inc. and others. All rights reserved. (ZTE)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -55,4 +55,10 @@ _M.server = {
["fail_timeout"] = 10,
["max_fails"] = 1
}
-return _M \ No newline at end of file
+_M.dns = {
+ ["servers"] = mark_empty_as_nil(os.getenv("UPSTREAM_DNS_SERVERS")),
+ ["cache_positive_ttl"] = 180, --shcache use,in seconds
+ ["cache_negative_ttl"] = 2, --shcache use,in seconds
+ ["cache_actualize_ttl"] = 120, --shcache use,in seconds
+}
+return _M