Closed Bug 968588 Opened 10 years ago Closed 3 years ago

Reuse tokens between syncs, assuming enough time remains before expiry

Categories

(Firefox for Android Graveyard :: Android Sync, defect, P5)

All
Android
defect

Tracking

(fennec+)

RESOLVED INCOMPLETE
Tracking Status
fennec + ---

People

(Reporter: rnewman, Unassigned)

References

Details

(Keywords: perf)

This becomes especially viable if we extend the token validity period, at the risk of losing data in, e.g., a sent tab.
Keywords: perf
Priority: -- → P3
Let's do this, persisting in memory.
Priority: P3 → P2
Assignee: nobody → nalexander
rfkelly: I see that tokens are by default valid for 300 units, which I infer to be seconds.  (This is not clear from http://docs.services.mozilla.com/token/apis.html, but that's a separate issue.)  Android may kill a sync after 5 minutes.  It's bad news to get killed midway through a sync; we definitely want to avoid that.  So we should only re-use a cached token if it's good for at least 5 more minutes.  The current 5 minute lifespan therefore makes this moot.  How would you feel about bumping the life of a token to a longer duration, say 15 or 20 minutes?  This will affect our token refresh story, but let's cross that bridge later.
Flags: needinfo?(rfkelly)
>  I see that tokens are by default valid for 300 units

Tokenserver should be issuing tokens valid for 3600 seconds; if not, then perhaps that config change has not rolled out to prod yet.  So yes, I feel pretty good about a longer token duration!
Flags: needinfo?(rfkelly)
tracking-fennec: 30+ → +
Version: Firefox 29 → unspecified
This has value - less work to do for the client on each sync - but there are bigger fish to fry.
Assignee: nalexander → nobody
Priority: P2 → P3
(In reply to :Grisha Kruglov from comment #4)
> This has value - less work to do for the client on each sync - but there are
> bigger fish to fry.

Counterpoint: it's been very helpful to know that Android Sync requests a fresh token from the token server every Sync.  Really simplifies arguing about what's happening as the ops side of Sync changes configurations, etc.

Counter-counterpoint: We do cache token server tokens on iOS, which has worked out okay.
Product: Android Background Services → Firefox for Android
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: P3 → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.