Citiverse
  • Our X-RateLimit-Reset headers are bad and we should feel bad

    Technical Discussion
    3 4 3

    evan@activitypub.spaceE
    10
    0

    I've found at least four different formats used on the Fediverse for the X-RateLimit-Reset header:

    • A datestamp (Mastodon)
    • Unix epoch in seconds
    • Time offset in seconds (N seconds from now)
    • Unix epoch in milliseconds (Holos)

    It's possible to use some heuristics for these (looks like a date, looks like an integer, range of the integer), which are pretty reliable.

    The new RateLimit headers from IETF are very nice, but don't seem to be well-supported yet.

  • evan@activitypub.spaceE
    10
    0

    Of course, you can just bang on the API until you get 429 restricted, too.

  • ryan@m29.usR
    1
    0

    @evan I have a Python function I've built up over time for handling rate limiting headers (no canonical location for it; I just copy it around when needed). I've come across epoch (GitHub) and ISO 8601 (Mastodon, Jira), but haven't seen the other two. I'll take a look at the RateLimit spec, thanks.

    (For the last few weeks I've been working on moving stuff to Forgejo, and I'm surprised their API doesn't have rate limit headers.)

  • julian@activitypub.spaceJ
    188
    0

    @evan 429? Amateur hour.

    You need to keep banging on the API until the server is overwhelmed and times out. That's the 2026 way.


Citiverse è un progetto che si basa su NodeBB ed è federato! | Categorie federate | Chat | 📱 Installa web app o APK | 🧡 Donazioni | Privacy Policy

Il server utilizzato è quello di Webdock, in Danimarca. Se volete provarlo potete ottenere il 20% di sconto con questo link e noi riceveremo un aiuto sotto forma di credito da usare proprio per mantenere Citiverse.