Update interval satellite scores

Does anybody now how often the scores in the api/sno/satellites get updated?

On satellite or storagenode side?

As far as I see it’s refreshed once per 4 hours:

./storagenode run --help  | grep repu
      --nodestats.reputation-sync duration                       how often to sync reputation (default 4h0m0s)

(+ 0…300 s random jitter)

4 Likes

I don’t know.

I mean /api/sno/satellites. How often does it make sense to poll for it?

I just mean for the audit, online and suspension score. If they get updated only once per hour it would not make sense to poll it every 5 minutes.

so, every 4 hours it will be synced. But it may be updated after several syncs though, because the satellite is updating a stat when a tally for the particular score for your node is finished, so it may be up to 24h.

Ok but this is only the node requesting the data from the satellite, right?
So the question would be what would be the minimum interval that makes sense?

Because if the satellite updates only once per hour and I sync every minute, this probably wouldn’t make sense.
So I guess my question would be what would be a good value for resyncing interval to remain in sync with the satellite updates?

the default one. Seriously. Your node could be rate limited otherwise.
Just note, your node is one from 20k+ active nodes.

I did not change the defaults on the node. So that means 4 hours?
So checking /api/sno/satellites every 4 hours would be sufficient too?

I think so. I believe that the all Stat is updated roughly every 12h, but some scores may be updated more often and may be, just maybe, more often than once a hour (at least an online score, my guessing is based on messages on the forum, that offline/online notifications are coming not immediately, but also not after 4 hours).

You get fresh data from satellite (which may or may not be updated recently, depends on number of audit which affects you) at every 4 hours.

But you don’t know when, exactly.

On the other hand, your call to your local StorageNode is quite cheap. It’s really just sqlite read, the values are stored on the SN side and cached.

If I understand well, you would like to monitor this value with polling your own storagenode(s).

I would use 5 or 10 minutes. Which means that you will have up-to-date after the satellite sync very soon. If you do it at every 4 hours, you may request data only after the request with 3h59 min.

(But as Alexey wrote, SN → satellite call is different, it can be rate limited by satellite, if you increase the frequency)

BTW: you can also call the external HTTP endpoint of your storagenode with HTTP. That contains the score + suspended / disqualified status if you set STORJ_HEALTHCHECK_DETAILS environment variable to true.

Example:

{
  "Statuses": [
    {
      "OnlineScore": 1,
      "SatelliteID": "1NusSk8HjWppghiWvofEBDqryDaxiALPah8EyRxXWdNkwXg7ai",
      "DisqualifiedAt": null,
      "SuspendedAt": null
    },
    {
      "OnlineScore": 0.9999183006535949,
      "SatelliteID": "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6",
      "DisqualifiedAt": null,
      "SuspendedAt": null
    },
    {
      "OnlineScore": 0.9999415204678362,
      "SatelliteID": "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S",
      "DisqualifiedAt": null,
      "SuspendedAt": null
    },
    {
      "OnlineScore": 0.9999651324965132,
      "SatelliteID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs",
      "DisqualifiedAt": null,
      "SuspendedAt": null
    }
  ],
  "Help": "To access Storagenode services, please use DRPC protocol!",
  "AllHealthy": true
}   
1 Like