{"id":1875,"date":"2021-10-13T20:38:06","date_gmt":"2021-10-13T11:38:06","guid":{"rendered":"https:\/\/www.itchefblog.com\/?p=1875"},"modified":"2021-10-13T20:38:06","modified_gmt":"2021-10-13T11:38:06","slug":"haproxy-health-check-%ec%8b%9c-http-status-%ec%97%90-%eb%94%b0%eb%9d%bc-%ec%84%9c%eb%b9%84%ec%8a%a4%ec%97%90-%ed%8f%ac%ed%95%a8%ec%8b%9c%ed%82%a4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/www.itchefblog.com\/?p=1875","title":{"rendered":"haproxy health-check \uc2dc http status \uc5d0 \ub530\ub77c \uc11c\ube44\uc2a4\uc5d0 \ud3ec\ud568\uc2dc\ud0a4\uae30"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">haproxy\ub85c reverse proxy\uad6c\uc131 \uc2dc backend \uad6c\uc131 \uc11c\ubc84\ub4e4\uc758 health check\ub97c \ud55c\ub2e4.<br>down\ub41c \uc11c\ubc84\ub294 proxy\uc5d0\uc11c \uc81c\uc678\uc2dc\ucf1c\uc8fc\uace0 up\ub41c \uc11c\ubc84\ub294 \ub2e4\uc2dc \ud3ec\ud568\uc2dc\ucf1c \uc8fc\ub294 \uc5ed\ud560\uc744 \ud558\ub294\ub370<br>\ubb38\uc81c\ub294 backend\uc5d0 \ud3ec\ud568\ub41c \uc11c\ubc84\uac00 boot \uc2dc\uac04\uc774 \uc18c\uc694\ub418\ub294 \uc11c\ubc84\ub77c\uba74..?<br>\uc608\ub97c\ub4e4\uba74 \uc791\uc740 \uc0ac\uc774\uc988\uc758 spring boot \uc571\uc758 \uacbd\uc6b0 \uc57d 10\ucd08 \ubbf8\ub9cc\uc758 \ubd80\ud2b8\uc2dc\uac04\uc744 \uac16\ub294\ub370, \ubd80\ud2b8\uac00 \uc644\ub8cc\ub418\uc5b4\uc11c response\ub97c \ud560 \uc218 \uc788\ub294 \uc0c1\ud0dc\uac00 \ub418\uae30 \uc804\uc5d0 haproxy\uc758 \uc11c\ube44\uc2a4\uc5d0 \ud3ec\ud568\ub418\uc5b4\uc11c \uadf8 \uc21c\uac04 \uc811\uc18d\ud55c \ud074\ub77c\uc774\uc5b8\ud2b8\ub294 response\ub97c \ubc1b\uc744 \uc218 \uc5c6\uac8c \ub41c\ub2e4.<br>\uc774\ub97c \ubc29\uc9c0\ud558\uae30 \uc704\ud574 \ud2b9\uc815\ud55c http status\uc77c \uacbd\uc6b0\uc5d0\ub9cc \ub2e4\uc2dc \uc11c\ube44\uc2a4\uc5d0 \ud3ec\ud568\uc2dc\ud0a4\ub3c4\ub85d \ud560 \uc218 \uc788\uc9c0 \uc54a\uc744\uae4c \ud558\ub294 \uc0dd\uac01\uc5d0 \uac80\uc0c9\uc744 \ud558\ub2e4\uac00 \ubc1c\uacac\ud55c \ubc29\ubc95\uc774\ub2e4.<br><br>[kt]<br>backend app<br>    http-check expect status 200<br>    server app1 127.0.0.1:8081 check fail 3 rise 2<br>    server app2 127.0.0.1:8082 check fail 3 rise 2<br>[\/kt]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc704\uc640 \uac19\uc740 \uacbd\uc6b0 app1\uc774\ub098 app2\uac00 \uc751\ub2f5\ud558\uc9c0 \uc54a\uc744 \uacbd\uc6b0 \ubc14\ub85c \uc11c\ube44\uc2a4\uc5d0\uc11c \uc81c\uc678\ub418\uace0, \uc7ac\uc2dc\uc791\uc774 \ub418\uc5c8\uc744 \uacbd\uc6b0\uc5d0\ub3c4 http status\uac00 200\uc774 \ub420\ub54c\uae4c\uc9c0 \uc11c\ube44\uc2a4\uc5d0 \ud3ec\ud568\uc2dc\ud0a4\uc9c0 \uc54a\ub294\ub2e4.<br>200\uc744 \uc751\ub2f5\ud558\ub294 \uacbd\uc6b0 \ubc14\ub85c \uc11c\ube44\uc2a4\uc5d0 \uc7ac\ud22c\uc785\ub418\ubbc0\ub85c \uac04\ub2e8\ud55c \ubb34\uc911\ub2e8 \ubc30\ud3ec\uc2dc\uc5d0 \ud3b8\ub9ac\ud558\uac8c \uc774\uc6a9 \uac00\ub2a5\ud558\ub2e4.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttp-check expect ! rstatus ^5\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\uc704\uc640\uac19\uc774 \uc791\uc131\uc744 \ud558\uba74 5xx\ub300\uc758 \ubaa8\ub4e0 \uc751\ub2f5\uc740 \uc5d0\ub7ec\ub85c \uc778\uc2dd..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>haproxy\ub85c reverse proxy\uad6c\uc131 \uc2dc backend \uad6c\uc131 \uc11c\ubc84\ub4e4\uc758 health check\ub97c \ud55c\ub2e4.down\ub41c \uc11c\ubc84\ub294 proxy\uc5d0\uc11c \uc81c\uc678\uc2dc\ucf1c\uc8fc\uace0 up\ub41c \uc11c\ubc84\ub294 \ub2e4\uc2dc \ud3ec\ud568\uc2dc\ucf1c \uc8fc\ub294 \uc5ed\ud560\uc744 \ud558\ub294\ub370\ubb38\uc81c\ub294 backend\uc5d0 \ud3ec\ud568\ub41c \uc11c\ubc84\uac00 boot \uc2dc\uac04\uc774 \uc18c\uc694\ub418\ub294 \uc11c\ubc84\ub77c\uba74..?\uc608\ub97c\ub4e4\uba74 \uc791\uc740 \uc0ac\uc774\uc988\uc758 spring boot \uc571\uc758 \uacbd\uc6b0 \uc57d 10\ucd08 \ubbf8\ub9cc\uc758 \ubd80\ud2b8\uc2dc\uac04\uc744 \uac16\ub294\ub370, \ubd80\ud2b8\uac00 \uc644\ub8cc\ub418\uc5b4\uc11c response\ub97c \ud560 \uc218 \uc788\ub294 \uc0c1\ud0dc\uac00 \ub418\uae30 \uc804\uc5d0 haproxy\uc758 \uc11c\ube44\uc2a4\uc5d0 \ud3ec\ud568\ub418\uc5b4\uc11c \uadf8 \uc21c\uac04 \uc811\uc18d\ud55c \ud074\ub77c\uc774\uc5b8\ud2b8\ub294 response\ub97c &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[567],"tags":[512,582,513,583,568,584,569,585,570,586,571,587,572,573,574,575,576,577,578,579,580,471,581],"class_list":["post-1875","post","type-post","status-publish","format-standard","hentry","category-haproxy","tag-proxy","tag-582","tag-513","tag-583","tag-haproxy","tag-584","tag-569","tag-585","tag-570","tag-586","tag-571","tag-587","tag-572","tag-573","tag-http-status","tag-http","tag-status","tag-577","tag-reverse","tag-reverse-proxy","tag-health","tag-check","tag-health-check"],"_links":{"self":[{"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1875"}],"version-history":[{"count":1,"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1875\/revisions"}],"predecessor-version":[{"id":1876,"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1875\/revisions\/1876"}],"wp:attachment":[{"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itchefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}