mozilla-services / autopush-rs

Push Server in Rust
Mozilla Public License 2.0
199 stars 16 forks source link

feat: Add redis based reliability reporting #778

Open jrconlin opened 4 weeks ago

jrconlin commented 4 weeks ago

This adds a feature flag reliable_report that optionally enables Push message reliablity reporting. The report is done in two parts. The first part uses a Redis like storage system to note message states. This will require a regularly run "cleanup" script to sweep for expired messages and adust the current counts, as well log those states to some sequential logging friendly storage (e.g. common logging or steamed to a file). The clean-up script should be a singleton to prevent possible race conditions.

The second component will write a record of the state transition times for tracked messages to a storage system that is indexed by the tracking_id. This will allow for more "in depth" analysis by external tooling.

The idea being that reporting will be comprised of two parts: One part which shows active states of messages (with a log of prior states to show trends over time), and an optional "in-depth" record that could be used to show things like length of time in storage, overall success rates, survivability rates, etc.

This patch also:

Closes: SYNC-4327