Applications made on Slow APIs

Configure Cloudflare Worker as Health Canaries

View the Desktop Version

We want to know immediately when the servers are not functioning or API servers break down. We can do this easily by setting up the healthchecks in CloudFlare.

It alows us to send health checks pings to the destination URLs and you can also specify the expected HTTP code, or the target response text. This is a quick way to write a test – also known as the Canaries.

Then from server logs, you can see:

[27/Mar/2021:19:03:01 +0000] “GET /api/merger/query/ HTTP/1.1” 200 372 “-” “Mozilla/5.0 (compatible;Cloudflare-Healthchecks/1.0;+https://www.cloudflare.com/; healthcheck-id: 2f2501de83eeaf85)”

You will be notified by email (sent from no-reply@notify.cloudflare.com) in case of any errors:

Health check status changed

2021-03-25 08:10:25 +0000 UTC | Down | Response code mismatch error | helloacm-api

Expected code: [200]

Received code: 522

To unsubscribe, please edit your Cloudflare Healthchecks notification settings.

Cloudflare, Inc. · 101 Townsend Street · San Francisco, CA 94107 · USA

Product Recommendations

View the Desktop Version
Exit mobile version