Page MenuHomePhabricator

page_change SLO windows
Open, Needs TriagePublic

Description

After a conversation with @elukey I was advised to create this task to find the correct windows to build the page_change SLOs (draft doc) and understand how Sloth would handle them.

Completeness SLO:
This SLI is computed monthly, so a sensible window is a rolling 12 months. The intent is to give downstream users confidence that there have been ~11 consecutive months of correct execution (i.e. the budget tolerates one bad month per year).

Freshness SLO:
The proposed window is a rolling quarter (3 months). It measures how many events arrive late in the stream (similar to how many responses miss their deadline in a web-server latency SLO).

The goal is to have all the graphs and alerts together in one Grafana page, and trigger an alarm whenever either of the two starts burning through its error budget.

Open questions:
How would Sloth manage the 12 months window?
Would a 1-month rolling window for freshness fit Sloth's behaviour better?

Event Timeline

Following further discussions with the team, we are designing an alternative approach for the Monthly Completeness SLO: on a monthly basis, all daily values will be uploaded to Prometheus to give better visibility into completeness trends throughout the month.

How would Sloth behave with this bulk upload?

@APizzata-WMF I think that Sloth's base alert will complain that no metrics is present during that time, so the ideal state would be those daily metrics to be pushed incrementally on a daily basis rather than in bulk. I am going to ping again the SLO working group, but my personal suggestion if you don't want to change the SLIs is to create a custom dashboard where to check your SLO, and leave Sloth unconfigured for this use case.

Hey @elukey, thanks for the reply.
Unfortunately we can compute these metrics only once a month, but I get your point. Please let me know if anything else comes up!

@APizzata-WMF got it thanks! @RLazarus will review this use case and propose a way forward soon!

Thanks @APizzata-WMF! Sorry to take so long to reply; I'm about to be out of office for a couple of weeks, so leaving some thoughts here before I go, but I'll be happy to talk more when I get back.

Can you say more about why it's impossible to compute these metrics more frequently than monthly?

The immediate practical concern (as @elukey says) is that the infrastructure isn't really designed for such sparse data; among other issues, most of the time when a timeseries has no data for almost a month, it's because it's broken, so we'd have the missing-data alerts going off. Our default visualizations wouldn't be much help to you either, with only three data points to draw every quarter.

But those things can be worked around. The real problem is, SLOs are designed to help you monitor performance and correct problems when they come up, and monthly data isn't usually enough to do that. By the time you find out about a problem, it can be weeks later, and sometimes too late to do anything about it. (If event.mediawiki_page_change_v1 completely stopped updating on January 3rd, you would want the completeness metric to indicate something was wrong sooner than February 1st, right?)

Can you tell us (and please forgive me if you already went through this with Luca) a little more about how these are computed -- for example, maybe the same mechanism behind your one-day tests in the Appendix can be used to feed into a one-day metric? Is the single monthly data point a practical limitation of the instrumentation, or a decision about what kind of completeness is important to consumers of this table, or something else?

For context, almost all of our SLIs at the Wikimedia Foundation are based on a fraction of events, for example HTTP requests -- for services that serve web traffic from end users, as soon as we serve a 500, it increases the error fraction. We've previously onboarded services whose SLIs take different forms, including when it only made sense to generate a metric once a day, but that's an extremely coarse metric by comparison -- making the timeseries even sparser, going to a single data point per month, is probably a stretch for the methodology.

Hey @RLazarus, thank you for the message and have fun on your PTO!

The monthly data points are unfortunately a limitation of our systems. The source of truth (wmf_raw.mediawiki_revision) to which we can compare the event.mediawiki_page_change_v1 content to, is computed monthly. However, there are some other options we can explore, I will come back on this point asap.

Regarding:

If event.mediawiki_page_change_v1 completely stopped updating on January 3rd you would want the completeness metric to indicate something was wrong sooner than February 1st, right?

If no new records are presents in the table, would mean that there are no new events present in the stream and therefore I would expect the missing-data alerts to go off on the freshness SLI.

Finally, the one day test you are referring too is for the freshness and was done to define a baseline for the SLO.

Hey @RLazarus I have managed to extract daily data points for the metric and will apply the same methodology applied in the mediawiki_content_history_completeness slo.
I think we can close this ticket. Thank you for your help!