openresty / lua-resty-upstream-healthcheck

Health Checker for Nginx Upstream Servers in Pure Lua
521 stars 134 forks source link

Small patch to match a specific string in body(or header) for healthness #29

Open ut0mt8 opened 7 years ago

ut0mt8 commented 7 years ago

Useful in some situation, you want to check something more precise than an http status. healthcheck.lua.patch.txt

agentzh commented 7 years ago

@ut0mt8 It's recommended to create github pull request to simplify code review and patch merging on our side. Thank you.

agentzh commented 7 years ago

@ut0mt8 BTW, receive("*a") may be VERY expensive when the response is huge. Don't do that.

ut0mt8 commented 7 years ago

Well I see there is already a similar pull request, I think my version is more simple, I can just switch to receive(2048) or whatever reasonable value. Anyway a page which a healtcheck must be simple, Is not a good idea to check the regular homepage :)

wtiancai commented 7 years ago

i agree ut0mt8's opnion,the test page may has very simple content,just like ok