Salta al contenuto
0
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
Skin
  • Chiaro
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Scuro
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Predefinito (Cerulean)
  • Nessuna skin
Collassa

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone
  1. Home
  2. Categorie
  3. Technical Discussion
  4. Our X-RateLimit-Reset headers are bad and we should feel bad

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

Pianificato Fissato Bloccato Spostato Technical Discussion
4 Post 3 Autori 1 Visualizzazioni
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • evan@activitypub.spaceundefined Questo utente è esterno a questo forum
    evan@activitypub.spaceundefined Questo utente è esterno a questo forum
    evan@activitypub.space
    scritto su ultima modifica di
    #1

    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.

    1 Risposta Ultima Risposta
    1
    1
    • evan@activitypub.spaceundefined Questo utente è esterno a questo forum
      evan@activitypub.spaceundefined Questo utente è esterno a questo forum
      evan@activitypub.space
      scritto su ultima modifica di
      #2

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

      1 Risposta Ultima Risposta
      1
      • evan@cosocial.caundefined evan@cosocial.ca ha condiviso questa discussione su
      • ryan@m29.usundefined Questo utente è esterno a questo forum
        ryan@m29.usundefined Questo utente è esterno a questo forum
        ryan@m29.us
        scritto su ultima modifica di
        #3

        @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). I'll take a look at the RateLimit spec, thanks.

        https://forge.colobox.com/rfinnie/rf-tools/src/branch/main/bin/mastodon-downloader#L50

        (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.)

        1 Risposta Ultima Risposta
        1
        • julian@activitypub.spaceundefined Questo utente è esterno a questo forum
          julian@activitypub.spaceundefined Questo utente è esterno a questo forum
          julian@activitypub.space
          scritto su ultima modifica di
          #4

          @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.

          1 Risposta Ultima Risposta
          1

          Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

          Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

          Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

          Registrati Accedi
          Rispondi
          • Risposta alla discussione
          Effettua l'accesso per rispondere
          • Da Vecchi a Nuovi
          • Da Nuovi a Vecchi
          • Più Voti


          Feed RSS
          Our X-RateLimit-Reset headers are bad and we should feel bad
          @pierobosio@soc.bosio.info
          V4.10.1 Contributors
          • Accedi

          • Accedi o registrati per effettuare la ricerca.
          • Primo post
            Ultimo post