ckcr4lyf / kiryuu

A highly performant HTTP bittorrent tracker (WIP)
Do What The F*ck You Want To Public License
13 stars 3 forks source link

Record announces with no change #16

Closed ckcr4lyf closed 1 year ago

ckcr4lyf commented 1 year ago

This will help determine how much we can cache the entire announce response (Which includes seeder count, leech count), since that would not have changed

Specifically, this can help determine whether we can:

  1. Use inaccurate caching - just set an expiry on the cache (e.g. 60 secs), and accept that within 60 secs the real value might have changed
  2. Accurate caching - always update the cache when seedcount / leechcount changes.

If the NOCHANGE ratio is high, then implementing (2) will have a very low cost, since writes won't be as necessary.

ckcr4lyf commented 1 year ago

LGTM