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

How to monitor performance of server? #830

Closed
zhiyong-ft opened this issue Sep 7, 2020 · 2 comments
Closed

How to monitor performance of server? #830

zhiyong-ft opened this issue Sep 7, 2020 · 2 comments

Comments

@zhiyong-ft
Copy link

zhiyong-ft commented Sep 7, 2020

Hi,

I am trying to monitor the performance of Ratchet server. At the minimum, the total number of connections, then latency, message count etc. of each connection. What are the proper ways to do this?

I can think of either store connections data onto disk then share that file, or store connections data into database, or add a separate end point to beam out those numbers upon all open/close/message events. The later seems a more proper way. But then there is authentication, which doesn't seem to be easy/out of box in Ratchet.

Please advise. Thanks.

@nineff
Copy link
Contributor

nineff commented Sep 8, 2020

I imagine you'd basically have to create your own testsuite for this. You could useeither client-side measurements or server-side measurements (or a combination of both) for latency. (You might want to look at #823 for an implementation regarding server side measurements)

Number of connections and message count can only really be measured on the server, a database seems to be the logical step here. Authentication can then be handled by this database as well.

@zhiyong-ft
Copy link
Author

I just went through beyondcode/laravel-websockets, the package that wraps around Ratchet for Laravel, it seems monitoring of cocurrent connections , message counts of each connection is done by periodically updating entries in database.

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