mozilla-services / autopush-rs

Push Server in Rust
Mozilla Public License 2.0
197 stars 15 forks source link

Adjust the router column family TTL #735

Open data-sync-user opened 1 month ago

data-sync-user commented 1 month ago

Prior to enabling router column family garbage collection by TTL, let’s make a formal decision on what TTL value we want moving forward. It’s current value is 30 days.

Our current max message TTL is 60 days (I believe we advertise 30 days as the max but we have historically allowed larger). It might make sense to reduce message’s TTL as well: I mention it here because the router record TTL should at the very least be > than message’s.

During an older attempt to enable router TTLs (on DynamoDB) we had in mind 60 days for router:

https://github.com/mozilla-services/autopush-rs/issues/223

https://github.com/mozilla-services/autopush-rs/issues/224

Note that:

I’d prefer a larger value such as 90 days: as long as we have router garbage collection in place for at least some value of TTL we’re in much better shape than we have been historically. This would give devices 3 months of inactivity before we delete their user record and subscriptions.

┆Issue is synchronized with this Jira Task

data-sync-user commented 1 month ago

➤ JR Conlin commented:

Per an informal discussion between Philip Jenvey and JR Conlin it was determined that the current best router TTL would be 60 days. This is double the MAX_CHANNEL_TTL of 30 days.

Justification: The Router record will be refreshed every time the UA connects with Autopush (this is done via update_user() and is part of the liveliness checks done for both mobile and desktop.) If a user has not used Firefox for over 60 days, it’s fair to consider the record abandoned.