skycoin / dmsg

dmsg
7 stars 17 forks source link

Expire dmsg clients from dmsg-discovery entries ; hourly re-registration of dmsg clients #247

Closed 0pcom closed 9 months ago

0pcom commented 11 months ago

Counting the number of entries in dmsg-discovery: https://dmsgd.skywire.skycoin.com/dmsg-discovery/entries

$ curl -L https://dmsgd.skywire.skycoin.com/dmsg-discovery/entries | awk -F "," '{print NF-1}'
10700

There are 10700 dmsg client entries in dmsg-discovery.

Counting the number of visors online:

$ skywire-cli ut -os
3300 visors online

While it's not impossible that we have twice the number of dmsg clients as visors online, it's highly unlikely that this is the case

On checking that dmsg client entries are removed after dmsgcurl, it seems that they are removed appropriately on clean exit.

Solution

Related issues:

https://github.com/skycoin/skywire-services/issues/38 https://github.com/skycoin/skywire-service-discovery/issues/1 https://github.com/skycoin/skywire/issues/1715

mrpalide commented 9 months ago

As re-register (heartbeat) logic is expensive, we run dmsg-monitor. Also we will have new/improve logic on register dmsg clients to discovery that will fix deregister non-visor entries issue.