lua-resty-upstream-healthcheck icon indicating copy to clipboard operation
lua-resty-upstream-healthcheck copied to clipboard

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

Open ut0mt8 opened this issue 8 years ago • 4 comments

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

ut0mt8 avatar Nov 19 '16 18:11 ut0mt8

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

agentzh avatar Nov 19 '16 18:11 agentzh

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

agentzh avatar Nov 19 '16 18:11 agentzh

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 :)

ut0mt8 avatar Nov 19 '16 18:11 ut0mt8

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

wtiancai avatar Mar 17 '17 14:03 wtiancai