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 (Nessuna skin)
  • 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. Flow control

Flow control

Pianificato Fissato Bloccato Spostato Technical Discussion
10 Post 6 Autori 31 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.space
    evan@activitypub.space
    evan@activitypub.space
    scritto su ultima modifica di
    #1

    I've been thinking lately about flow control. That's a feature of some networks where a receiver can tell a sender to slow down its sending rate to match the receiver's processing rate.

    In TCP flow control, the receiving host returns a receiving buffer size in its acknowledgement segment, so the sending host know how much data it can send without overflowing the buffer.

    I wonder if there are ways that a receiving ActivityPub protocol server could tell the sending server to slow down? Maybe we could reuse some of the RateLimit headers.

    Another option would be a special header that says how big your incoming activity queue is. "I have a very long processing queue right now, please keep stuff in your outgoing queue for a while."

    1 Risposta Ultima Risposta
    1
    • evan@activitypub.space
      evan@activitypub.space
      evan@activitypub.space
      scritto su ultima modifica di
      #2

      Obviously the other option is to keep sending until the receiving server fails, and then do exponential backoff until the remote server can process your activity again.

      But I'm looking for something more adaptive that adjusts the sending rate before the receiver fails.

      1 Risposta Ultima Risposta
      0
      • fentiger@mastodon.social
        fentiger@mastodon.social
        fentiger@mastodon.social
        scritto su ultima modifica di
        #3

        @evan https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/429 ?

        evan@activitypub.space julian@activitypub.space 2 Risposte Ultima Risposta
        1
        • fentiger@mastodon.social fentiger@mastodon.social

          @evan https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/429 ?

          evan@activitypub.space
          evan@activitypub.space
          evan@activitypub.space
          scritto su ultima modifica di
          #4

          fentiger@mastodon.social yes, but by that point you've failed. What I want is to have more adaptive sending, so you don't get to the 429 code.

          1 Risposta Ultima Risposta
          0
          • fentiger@mastodon.social
            fentiger@mastodon.social
            fentiger@mastodon.social
            scritto su ultima modifica di
            #5

            @evan No, you haven't. You just need to back off and retry, just as you do for an ACK timeout in TCP.

            evan@activitypub.space 1 Risposta Ultima Risposta
            0
            • fentiger@mastodon.social fentiger@mastodon.social

              @evan https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/429 ?

              julian@activitypub.space
              julian@activitypub.space
              julian@activitypub.space
              scritto su ultima modifica di
              #6

              fentiger@mastodon.social yes I was also thinking of the venerable 429.

              evan the thing is, both approaches rely on the receiving end to support it. I would make the argument that a 429 would have nominal support from some implementations, but then again I wouldn't actually bet money on it.

              Either way you're looking at an FEP to establish flow control signalling or 429 handling. I'd then make the argument that putting together guidance for 429 (+ exponential back off) is easier than specifying flow control logic.

              1 Risposta Ultima Risposta
              0
              • jamesmarshall@sfba.social
                jamesmarshall@sfba.social
                jamesmarshall@sfba.social
                scritto su ultima modifica di
                #7

                @evan does AP have a way to send control messages, just meant for the receiving server?

                1 Risposta Ultima Risposta
                0
                • rimu@piefed.social
                  rimu@piefed.social
                  rimu@piefed.social
                  scritto su ultima modifica di
                  #8

                  Currently whenever a POST is sent to an inbox the response body is ignored. The http status code is checked for errors but that's it. Perhaps some more complex information about the state of the receiving ingress queue could be conveyed in the body.

                  1 Risposta Ultima Risposta
                  0
                  • fentiger@mastodon.social fentiger@mastodon.social

                    @evan No, you haven't. You just need to back off and retry, just as you do for an ACK timeout in TCP.

                    evan@activitypub.space
                    evan@activitypub.space
                    evan@activitypub.space
                    scritto su ultima modifica di
                    #9

                    fentiger@mastodon.social Flow control is the feature in TCP where the receiving host, in its ACK, can send back information about its remaining buffer space. The sending host can slow down its sending rate to prevent overflowing that buffer. If this works correctly, no error is ever sent.

                    1 Risposta Ultima Risposta
                    0
                    • silvermoon82@wandering.shop
                      silvermoon82@wandering.shop
                      silvermoon82@wandering.shop
                      scritto su ultima modifica di
                      #10

                      @evan
                      HTTP 420/CHILL OUT?

                      Actually I do see HTTP 429 TOO MANY REQUESTS, which seems exactly what we want. I don't know what support is like though, I've not seen explicit support for it in the few bits of AP Federation code I've taken apart.

                      1 Risposta Ultima Risposta
                      0

                      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
                      Flow control
                      @pierobosio@soc.bosio.info
                      NodeBB Contributors
                      • Accedi

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