Skip to content

Fix #292: Add server-specific channel statistics #315

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbergo
Copy link

@mbergo mbergo commented Apr 18, 2025

This commit adds support for server-specific channel statistics to prevent information leakage between different server instances running on the same host.

The issue was that the published_messages and stored_messages counters were stored in a shared memory segment that is shared across all server instances running on the same host. When a user requests channel statistics from one server instance, they were seeing the combined statistics from all server instances, which could leak information.

Changes:

  • Added a new directive push_stream_server_id to set a unique identifier for each server instance
  • Added server-specific counters for published_messages and stored_messages
  • Modified the channel statistics handler to use the server-specific counters when available
  • Updated the documentation to include the new directive

This fix ensures that each server instance only reports its own statistics, preventing information leakage between different server instances.

Addresses: #292

cc: @wandenberg

This commit adds support for server-specific channel statistics to prevent information leakage between different server instances running on the same host.

The issue was that the published_messages and stored_messages counters were stored in a shared memory segment that is shared across all server instances running on the same host. When a user requests channel statistics from one server instance, they were seeing the combined statistics from all server instances, which could leak information.

Changes:
- Added a new directive push_stream_server_id to set a unique identifier for each server instance
- Added server-specific counters for published_messages and stored_messages
- Modified the channel statistics handler to use the server-specific counters when available
- Updated the documentation to include the new directive

This fix ensures that each server instance only reports its own statistics, preventing information leakage between different server instances.
@sunnychun
Copy link

sunnychun commented Apr 18, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants