Re:Show HN: Deploy a Go Lambda to Ping a Site in 20 Seconds
by laci27 on Tuesday February 27, 2018 @04:42AM
(#16472206)
actually, it's not.
We create a special page, with PHP and one with nodejs, that just replies '1', so besides status, we also get a notice if nodejs or PHP malfunctions (which does happen on some servers, 1-2 time a year).
Re:Show HN: Deploy a Go Lambda to Ping a Site in 20 Seconds
by giancarlostoro on Tuesday February 27, 2018 @09:02AM
(#16473375)
HEAD is still less wasteful and just as effective.
Re:Show HN: Deploy a Go Lambda to Ping a Site in 20 Seconds
by mbrumlow on Tuesday February 27, 2018 @10:02AM
(#16473866)
You can still do all that with HEAD, the only difference is you don't return a message body, thus saving 1 byte plus a few in the actual header you would not need any more.
For example; you would do a head request and node.js and php would still need to be configured to handled the HEAD request but instead of its handler returning "1" it would simply return.
Perhaps to be less wasteful, the HTTP request should be a HEAD instead of GET? There’s little point downloading a whole page if you are going to just throw away the contents...