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. Fediverso
  4. Got an interesting question today about #Fedify's outgoing #queue design!

Got an interesting question today about #Fedify's outgoing #queue design!

Pianificato Fissato Bloccato Spostato Fediverso
queuefedifyfedidevfediverseactivitypub
2 Post 1 Autori 0 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.
  • fedify@hollo.socialundefined Questo utente è esterno a questo forum
    fedify@hollo.socialundefined Questo utente è esterno a questo forum
    fedify@hollo.social
    scritto su ultima modifica di
    #1

    Got an interesting question today about #Fedify's outgoing #queue design!

    Some users noticed we create separate queue messages for each recipient inbox rather than queuing a single message and handling the splitting later. There's a good reason for this approach.

    In the #fediverse, server response times vary dramatically—some respond quickly, others slowly, and some might be temporarily down. If we processed deliveries in a single task, the entire batch would be held up by the slowest server in the group.

    By creating individual queue items for each recipient:

    • Fast servers get messages delivered promptly
    • Slow servers don't delay delivery to others
    • Failed deliveries can be retried independently
    • Your UI remains responsive while deliveries happen in the background

    It's a classic trade-off: we generate more queue messages, but gain better resilience and user experience in return.

    This is particularly important in federated networks where server behavior is unpredictable and outside our control. We'd rather optimize for making sure your posts reach their destinations as quickly as possible!

    What other aspects of Fedify's design would you like to hear about? Let us know!

    #ActivityPub #fedidev

    fedify@hollo.socialundefined 1 Risposta Ultima Risposta
    0
    • fedify@hollo.socialundefined fedify@hollo.social

      Got an interesting question today about #Fedify's outgoing #queue design!

      Some users noticed we create separate queue messages for each recipient inbox rather than queuing a single message and handling the splitting later. There's a good reason for this approach.

      In the #fediverse, server response times vary dramatically—some respond quickly, others slowly, and some might be temporarily down. If we processed deliveries in a single task, the entire batch would be held up by the slowest server in the group.

      By creating individual queue items for each recipient:

      • Fast servers get messages delivered promptly
      • Slow servers don't delay delivery to others
      • Failed deliveries can be retried independently
      • Your UI remains responsive while deliveries happen in the background

      It's a classic trade-off: we generate more queue messages, but gain better resilience and user experience in return.

      This is particularly important in federated networks where server behavior is unpredictable and outside our control. We'd rather optimize for making sure your posts reach their destinations as quickly as possible!

      What other aspects of Fedify's design would you like to hear about? Let us know!

      #ActivityPub #fedidev

      fedify@hollo.socialundefined Questo utente è esterno a questo forum
      fedify@hollo.socialundefined Questo utente è esterno a questo forum
      fedify@hollo.social
      scritto su ultima modifica di
      #2

      Coming soon in #Fedify 1.5.0: Smart fan-out for efficient activity delivery!

      After getting feedback about our queue design, we're excited to introduce a significant improvement for accounts with large follower counts.

      As we discussed in our previous post, Fedify currently creates separate queue messages for each recipient. While this approach offers excellent reliability and individual retry capabilities, it causes performance issues when sending activities to thousands of followers.

      Our solution? A new two-stage “fan-out” approach:

      1. When you call Context.sendActivity(), we'll now enqueue just one consolidated message containing your activity payload and recipient list
      2. A background worker then processes this message and re-enqueues individual delivery tasks

      The benefits are substantial:

      • Context.sendActivity() returns almost instantly, even for massive follower counts
      • Memory usage is dramatically reduced by avoiding payload duplication
      • UI responsiveness improves since web requests complete quickly
      • The same reliability for individual deliveries is maintained

      For developers with specific needs, we're adding a fanout option with three settings:

      • "auto" (default): Uses fanout for large recipient lists, direct delivery for small ones
      • "skip": Bypasses fanout when you need different payload per recipient
      • "force": Always uses fanout even with few recipients
      // Example with custom fanout setting
      await ctx.sendActivity(
        { identifier: "alice" },
        recipients,
        activity,
        { fanout: "skip" }  // Directly enqueues individual messages
      );
      

      This change represents months of performance testing and should make Fedify work beautifully even for extremely popular accounts!

      For more details, check out our docs.

      What other #performance optimizations would you like to see in future Fedify releases?

      #ActivityPub #fedidev

      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
      Got an interesting question today about #Fedify's outgoing #queue design!
      @pierobosio@soc.bosio.info
      V4.10.1 Contributors
      • Accedi

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