Skip to content
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

Add number of messages/second #20

Open
edgardmessias opened this issue Oct 28, 2019 · 3 comments
Open

Add number of messages/second #20

edgardmessias opened this issue Oct 28, 2019 · 3 comments

Comments

@edgardmessias
Copy link
Contributor

Add number of messages/second.

Maybe, can use the metric to show this information

@FZambia
Copy link
Member

FZambia commented Apr 30, 2020

Makes a lot of sense I suppose. If someone interested investigating possibility to display this - I am happy to help.

@edgardmessias
Copy link
Contributor Author

Hi @FZambia
I think we can use the value of centrifuge.node.messages_received_count.type.publication or centrifuge.node.messages_sent_count.type.publication and devide by interval to get messages/second

@FZambia
Copy link
Member

FZambia commented Apr 30, 2020

I know that metrics are poorly documented at moment so will try to describe what we have regarding to this filling that gap a bit:

  • node.messages_sent_count - amount of messages that were sent to Engine, these messages can than be multiplied on amount of subscribers in channels. I.e. 1 message here can then become 1000 real messages (depending on active subscribers amount). Has different values for publication, join, leave, control in aggregated metrics map.
  • node.messages_received_count - amount of messages that came from Engine to node over PUB/SUB connection. Also can be multiplied later to many real messages sent to active subscribers. messages_received_count should be less or equal to messagesSentCount. Has different values for publication, join, leave, control in aggregated metrics map.
  • transport.messages_sent - this one shows total number of different messages sent to physical connection towards connected clients including publications, joins, leaves, also replies to client commands. I.e. this is actually all messages sent over the wire to clients (actually I just realized that this is not quite true since there is a chance that small fraction of them can be later merged to one real message to reduce syscalls).
  • client.command_duration_seconds - this includes times and counters for commands received from clients.

One thing is that metrics aggregated over a pretty large interval at moment so they will only be refreshed once in an interval which is pretty big by default (60 seconds). Depending on how they are used not everyone can tweak this interval to also get more frequently updated stats in web interface.

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

No branches or pull requests

2 participants