From 85b73051cf2ae9485fb58107b1a2cfdc62918270 Mon Sep 17 00:00:00 2001 From: dingpei Date: Wed, 13 Sep 2023 19:24:11 +0800 Subject: [PATCH] update nginx, add health check --- .../src/main/java/com/xiaomi/youpin/nginx/NginxUtilsV2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jcommon/nginx/src/main/java/com/xiaomi/youpin/nginx/NginxUtilsV2.java b/jcommon/nginx/src/main/java/com/xiaomi/youpin/nginx/NginxUtilsV2.java index aa77bda2b..9d55347c3 100644 --- a/jcommon/nginx/src/main/java/com/xiaomi/youpin/nginx/NginxUtilsV2.java +++ b/jcommon/nginx/src/main/java/com/xiaomi/youpin/nginx/NginxUtilsV2.java @@ -89,8 +89,8 @@ public static String addServer(String config, String name, List serversT }); List checkList = StringUtils.isNotEmpty(checkUrl) - ? Lists.newArrayList("check interval=3000 rise=2 fall=3 timeout=1000 type=http", String.format("check_http_send \"HEAD %s HTTP/1.0\\r\\n\\r\\n\"", checkUrl)) - : Lists.newArrayList("check interval=3000 rise=2 fall=3 timeout=1000 type=tcp"); + ? Lists.newArrayList("check interval=3000 rise=2 fall=3 timeout=1000 default_down=false type=http", String.format("check_http_send \"HEAD %s HTTP/1.0\\r\\n\\r\\n\"", checkUrl)) + : Lists.newArrayList("check interval=3000 rise=2 fall=3 timeout=1000 default_down=false type=tcp"); checkList.stream().forEach(p -> { NgxParam param = new NgxParam(); param.addValue(p);