-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul stats: Use broadcast channel for events in HTTP Core #1388
Labels
Comments
This was referenced Mar 18, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Mar 18, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Mar 18, 2025
…adcast Stats events were introduced to colelct tracker metrics. WE only have global metrics (aggregate metrics for all UDP and HTTP trackers). This will change in the future: - Seggregated metrics: one listeners per tracker (per socket). - Generic events: there could be other event consumers. Events will be decoupled from stats. This change allows multiple receivers in the channel. For now, we one use one listener but with this change it will be easy to add more.
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Mar 18, 2025
…adcast Stats events were introduced to collect tracker metrics. We only have global metrics (aggregate metrics for all UDP and HTTP trackers). This will change in the future. We will have: - Segregated metrics: one listeners per tracker (per socket). - Generic events: there could be other event consumers. Events will be decoupled from stats. This change allows multiple receivers in the channel. For now, we one use one listener but with this change will be easy to add more.
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Mar 18, 2025
…adcast Stats events were introduced to collect tracker metrics. We only have global metrics (aggregate metrics for all UDP and HTTP trackers). This will change in the future. We will have: - Segregated metrics: one listeners per tracker (per socket). - Generic events: there could be other event consumers. Events will be decoupled from stats. This change allows multiple receivers in the channel. For now, we one use one listener but with this change will be easy to add more.
josecelano
added a commit
that referenced
this issue
Mar 18, 2025
… Core 5f9c4d3 refactor: [#1388] change channel in HTTP core from mpsc to broadcast (Jose Celano) 64c7b21 refactor: [#1388] minor changes to HTTP core events (Jose Celano) Pull request description: Stats events were introduced to collect tracker metrics. We only have global metrics (aggregate metrics for all UDP and HTTP trackers). This will change in the future. We will have: - **Segregated metrics**: one listener per tracker (per socket). - **Generic events**: there could be other events consumers. Events will be decoupled from stats. This change allows multiple receivers in the channel. For now, we one use one listener but with this change will be easy to add more. ACKs for top commit: josecelano: ACK 5f9c4d3 Tree-SHA512: 9732bd79ba3515bd8aacbd7df854d8419afdf161555f96ab011278f04eb0f5c23c8a8003610e47b8adb14fe338d683b2fde142eca5ab94cd0d9afda82190249e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Switch from mpsc to broadcast channel. That will allow multiple event listeners.
It will make the code a little bit more complex becuase we have to handle "Lagging" but evens with one one subscriber are not very useful. They are limited for collecting global metrics or do other stuff but in a centralized way. Multiple listeners allows decoupling logic associated to events.
cc @da2ce7
The text was updated successfully, but these errors were encountered: