Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 179
    • Issues 179
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #501

Closed
Open
Opened Aug 25, 2025 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
  • New issue
Report abuse New issue

Consider reducing or removing throttling in the dispatcher as it's confusing for the user

While working on #498, I couldn't understand why I wasn't getting any notification on the frontend when my ngrams import formed a loop: I could see that the server emitted the relevant log error message pretty much immediately, but nothing on the frontend.

Then, by accident, I waiting more than one minute and the notification eventually appeared.

This is due to the following code inside dispatcherListener:

    Async.withAsync (throttle (_nc_dispatcher_throttle_ms * 1000) throttleTChan
                     (sendDataMessageThrottled nc log_cfg)) $ \_ -> do

Under normal circumstances this would be around 8 minutes, because the default value in gargantext-settings.toml is 500 (ms) and here we multiply by 1000. I think this is way too much, and completely confusing for users.

@cgenie Questions:

  1. Why do we need throttling at all? I understand it could be a way to implement some form of backpressure, but surely we can do that with other heuristics, like looking at the connected clients or the number of messages waiting to be dispatched?
  2. Can we reduce this number? I think we should remove the 1000 multiplier. I feel that 500ms is always pretty generous -- can we go lower than that?
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#501