Giter Club home page Giter Club logo

Comments (4)

cuu508 avatar cuu508 commented on September 21, 2024 2

Thanks, that's a good idea, added the Retry-After header for 429 responses.

from healthchecks.

cuu508 avatar cuu508 commented on September 21, 2024

Thanks for the suggestion! The UUID URLs on the hosted service have been returning HTTP 200 from the start, and I don't think I can change that behavior now, this would risk breaking existing setups.

When I was implementing slug URLs, I changed the logic to also return 404 and 429 status codes. No-one was using the slug URLs yet, so there was no problem changing the behavior.

I had a quick look at favonia/cloudflare-ddns#239. The HTTP client would not retry HTTP 200 status codes, but perhaps that's not a huge problem?

  • If a check with a particular UUID does not exist, there's no point retrying it – it is unlikely to come into existence on retry
  • If the HTTP client hits a rate limit, this means the client is pinging too often. It should ping less often instead of retrying even more!

(though I agree, it would be better to return 404 and 429, so the client knows what's up and can make intelligent decisions, instead of returning 200 and tricking client into thinking everything's OK)

from healthchecks.

favonia avatar favonia commented on September 21, 2024

@cuu508 Thanks for checking all of these. You are absolutely right. It was my perfectionism preventing the (practical) unification of all retry logic. For the code 429 though, have you considered sending a Retry-After HTTP header? This should prevent (good) clients from pinging too much.

from healthchecks.

favonia avatar favonia commented on September 21, 2024

I am closing this because there are no more actionable items. I took your advice and refactored my code. Thank you again for your time.

from healthchecks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.