-
Notifications
You must be signed in to change notification settings - Fork 2
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
Status Desktop and Mobile active Waku peers metrics #54
Comments
There are at least four ways to do this:
Option |
The option It does contain the distinction between |
The option https://metrics.status.im/d/gxQG_R1Zk/status-peers?orgId=1&refresh=15m&from=now-90d&to=now These metrics were added by me in this PR: And were generated from node names which look like this:
Which would be then turned into peer metrics that looked like this:
Docks: https://github.com/status-im/status-go/blob/develop/metrics/README.md#metrics This is nice to have, but main issue is that desktop and mobile peers can connect to multiples server nodes. |
I see no other options than what I outlined, you can try asking some Waku people, but I doubt there's anything else. Since option |
Note that the Waku team took over the telemetry service for the purpose of measuring reliability and our learning is that this service is not worth being maintained: https://forum.vac.dev/t/the-future-of-status-telemetry/405/4 The network component of Status is handle by the Waku protocol and team, so best to talk to us for this kind of data. The Waku protocol is a decentralized p2p communication framework. This is not a web2 app where infra can magically summon numbers out of cookies. From a Waku PoV, there is no difference between desktop and mobile nodes. So such data collection will have to be done in an intrusive manner (ie, via telemetry or some other centralized collection model where the app push this specific data to a centralized server). Having said that, Status mobile can only run in edge mode (light client), whereas desktop can run in both edge and relay. A panel that looks at the protocol and count "filter" vs "relay" peers would give an indication of "edge" vs "relay" peers. But this will not be exact as our fleet only has a partial view of the network. Finally, note that I am trying to plan improving the Waku Network Monitor and deploying on Status fleet to get this kind of info. But again, this only provides a partial view of the network. |
And yet @jm-clius in a Discord thread has said that:
So there is some difference which we could use as indication. As long that is the case and we provide a log message on peer connection that would include the peer ID and the information that would allow us to detect - or guess - the type of application installation. With that I can then collect that in our ELK stack and graph that on Kibana. That part is trivial Now, I don't particularly care if you want to provide this data or not. You can argue with @sunleos about privacy concerns and whatever else you might want to. I'm just interested in delivering what is doable. |
All apps must connect to our fleet store nodes to retrieve messages because store is not decentralized (yet). Something like that would be good, but best to sum all peers across all nodes (a peer will use one store node at a time). Now, in terms of mobiel vs desktop. Yes, so what @jm-clius said is the same as what I said. If we count nodes with "filter" vs "relay" protocols mounted, we can get a rough idea of mobile-desktop ratio. it's not exact because anyone can enable "light mode" in desktop, and start looking like a mobile. For that, looking at libp2p protocol via identify is what you want https://grafana.infra.status.im/d/b819dbfe-acb6-4086-8736-578ca148d7cd/waku-networkmonitor-v2?orgId=1&refresh=5s&from=1737498267860&to=1737501867860&viewPanel=6, and agian, have it looking at prometheus from the store nodes.
@chaitanyaprem @richard-ramos can help confirm here because both desktop in relay mode and mobile in light mode would have "filter" mounted, would the light client return a different protocol on libp2p identify? |
your statements are correct @fryorcraken . one minor change is that the client may not disconnect from store node as we have periodic query. But in case of mobile data clients would end up disconnecting. one more point to note is that clients can use store nodes from prod/staging fleet. |
identify will have same filter protocol for lightclient whether it is mobile/desktop. So it would be hard to know which is which. e.g I run my desktop in lightclient mode due to monthly data usage limitations from my ISP. |
It was also added by @adklempner on Discord that:
So essentially, unless we enforce a persistent peer ID in mobile and desktop applications counting of unique peers is impossible. |
While hilarious, it was not appropriate. My apologies @sunleos |
Yes correct.
Yes correct, hence why I said
Ok so it means that the best way is to count |
Now, the question is, will mobile and desktop be fine with changing the behavior to actually persist peer IDs, since it can be considered a reduction in privacy and anonymity. I can probably predict what Jarrads reaction would be to it. |
@ilmotta has confirmed for me that Mobile does indeed change peer ID on every node restart, even just logout is enough:
|
We've identified two caveats:
I believe the first caveat can be solved by using the same strategy I had implemented for telemetry. In I think this method for counting peers using periodic snapshots instead of aggregating logs can provide an accurate number of unique peers, even with the caveat that a single instance of Status desktop/mobile does not maintain a consistent peer ID. Presumably, even if the peer ID for a libp2p node changes, another node will only keep a single connection with that instance. It looks like the Waku peer store also provides the supported protocols for a peer https://github.com/waku-org/go-waku/blob/master/waku/v2/peerstore/inherited.go#L122 This should allow us to split the unique peers into whether they are likely to be mobile or desktop. This may not be 100% accurate given the second caveat. |
What do you mean? Can't get peer id over Prometheus. How is it different from counting at number of peers connected to store nodes? |
@fryorcraken my understanding is that desktop and mobile peers can be connected to multiple waku nodes at the same time. And if that is indeed the case then summing up counts of peers would give a higher number than in reality, unless we compare peer IDs. @adklempner I don't really see the difference between telemetry and counting unique peer IDs from logs in Kibana for a given period, for example 24 hours. It seems like we are talking about the same thing. |
Would like to request the following metrics:
The text was updated successfully, but these errors were encountered: