Page MenuHomePhabricator

Analyze impact of Beta rollout of Apple's Relay service on editing activity & IP blocks
Closed, ResolvedPublic

Description

Original request

Impact so far: How many non-bot edits have been blocked for belonging to one of the IP ranges that are being used for Relay? We want to know these counts grouped by these attributes:

  • Date
  • Wiki project (e.g. English Wikipedia, Indonesian Wikisource, Commons, etc.)
  • Platform (e.g. desktop, mobile, iOS app, Android app)
  • Operating system (e.g. iOS 14, iOS 15, etc)
  • Whether the edit was from a logged-in account or not.

Adjusted request

There are two questions we want to answer next. In bold are the questions from the product perspective. Under them are "potential tactics" for answering the questions, but the analyst can decide how best to approach them and with what datasets. We want to include both logged-in and logged-out usages for all of these.

  • How widespread is the adoption of Relay among Safari users? How has it been changing over time?
    • Potential tactic: Of all the web requests we're getting, what percent of them are coming from Relay IP addresses over time? This might be broken down by day, week, or month -- we want to see if it's increasing and at what rate. Bonus: are these, in fact, almost entirely from Safari and from iOS 15?
    • Potential tactic: Of all the web requests we're getting associated with editing (e.g. loading the editor or sending an edit publish request), what percent of them are coming from Relay IP addresses over time? This might be broken down by day, week, or month -- we want to see if it's increasing and at what rate. Bonus: are these, in fact, almost entirely from Safari and from iOS 15?
  • How many edits are not happening because they are being blocked simply for coming from Relay IP addresses?
    • Potential tactic:
      • How many of the web requests to publish an edit come from Relay IP addresses over time? And how many have come in from other IP addresses (for comparison)?
      • How many of the edits published come from Relay IP addresses over time? And how many have come in from other IP addresses (for comparison)?
      • Then we would subtract one from the other to guess at how many edits have been blocked from those Relay IP addresses.

Details

Other Assignee
SNowick_WMF

Event Timeline

mpopov triaged this task as High priority.Sep 29 2021, 6:56 PM
mpopov updated Other Assignee, added: nettrom_WMF.

Moving to needs investigation as we're still trying to figure out if we have any data to help us answer this

mpopov updated Other Assignee, added: SNowick_WMF; removed: nettrom_WMF.
mpopov added a subscriber: SNowick_WMF.

Update: We're currently looking into what data sources we have that might help us answer this question.

Morten has reached out to Trust & Safety's Operations team to check if they have any additional data related to IP blocks.

From @nettrom_WMF:

I think the way to go is to wait for wmf_raw.mediawiki_private_cu_changes to get sqooped in, then combine that with event.mediawiki_revision_create and event.mediawiki_user_blocks_change to get all the necessary data on edits and whether a block happened related to that edit. I think Martin’s code for determining proxy IPs is going to be good for this as well.

Moving this to Blocked for now since we're waiting for September data to become available.

Moving this back to Doing as the September snapshots are available. I'm planning to use wmf_raw.mediawiki_revision and wmf_raw.mediawiki_private_actor to identify whether the edit was made by a registered user or not as those are authoritative sources for that information. I'll use wmf_raw.mediawiki_private_cu_changes for browser and OS information.

One thing I was made aware of earlier today was that Global blocks are used to block open proxies. These are created on Meta-wiki and logged there with log_type = "gblblock". From what I can tell, these do not show up in event.mediawiki_user_blocks_change. I therefore plan to use wmf_raw.mediawiki_logging to identify local (to a given wiki) and global blocks and join that with the other data sources.

nettrom_WMF added a subscriber: jwang.

A first pass of this analysis is done and I'm moving this to Needs Review as I've asked @SNowick_WMF and @jwang to review my code.

In the end, I filtered wmf_raw.mediawiki_private_cu_changes on Safari edits and used an adaptation of Martin Urbanec's code to identify those made through the relay service. This reduces the problem to a very tractable size at which point one can add user information from the revision, archive, actor, and user_groups tables to label them as logged-in, bot by name, and bot by group. It's also then feasible to query the logging table on the respective wikis and metawiki to get potential blocks and identify whether they blocked the given IP as one can limit them in time by the edit timestamp (and I've been using a 6 hour threshold based on the analysis of the usefulness of IP edits).

I reviewed @nettrom_WMF 's process and ran the queries, got the same result as his initial findings. Thanks Morten for doing the research and work to get queries down to a reasonable (~3 hours) run time.

@nettrom_WMF, the code and algorithm look correct to me. I left message about the number of blocks on relay IPs in slack. Since it's not part of the review, we can discuss there.

MMiller_WMF added a subscriber: JMinor.

@nettrom_WMF -- I put notes from our talk today as the "adjusted request" in the task description. Thank you!

We now have estimates for both of the questions in this task.

How widespread is the adoption of Relay among Safari users? How has it been changing over time?

I reused the code we developed to identify iOS 15 pageviews in pageview_actor, and set it up to generate daily aggregates on a per-project basis to a table in the Data Lake (nettrom_apple_relay.daily_usage_per_project). From this I built a couple of charts in Superset, one showing it across all projects, and one allowing for filtering on a per-project basis. We find increased adoption and usage of iOS 15 over time, as we'd expect. The overall percentage of iOS 15 pageviews coming in through the relay looks to be fairly stable around 3%.

How many edits are not happening because they are being blocked simply for coming from Relay IP addresses?

It's difficult to provide good estimates for this because we lack good data. There doesn't seem to be any logging in MediaWiki of blocked edit attempts, nor do we appear to have instrumentation that logs this.

In lieu of better data, I chose to estimate this by combining the iOS 15 pageviews from pageview_actor, using the same method as before, with iOS 15 edits from wmf_raw.mediawiki_private_cu_changes. In both cases we derive a boolean is_relay variable that defines whether the pageview or edit was made with an IP in the relay ranges. Using these datasets to make this estimate requires making a key assumption: the probability of clicking "Edit" and saving the edit once started is the same across both groups of users. This assumption might not hold, we might for instance expect users who are using the relay service to be more (or less) likely to click "Edit". With more time we might be able to get a reasonable estimate of that using web requests.

So, this is our best estimate for now. I used data from Sept 20 (iOS 15 release day) through Sept 30 as that data is readily available. I then find that the estimated mean number of edits per 1 million pageviews from iOS 15 when not using the relay is 241 edits (with a Standard Error of 1.3 edits). When using the relay, the same estimate is 9 edits (again with SE of 1.3 edits).

Over the 11-day period, this mean difference in probability comes out to 1,321 edits not being made in the relay group, or about 120 edits per day. As the number of pageviews increases with the adoption of iOS 15, the number of daily edits not being made also increases.

@MMiller_WMF : Do these estimates satisfy this request? If so, let's resolve this task and follow up on further measurement needs in future tasks.

Closing this as resolved, as the analysis is completed. We'll create new tasks if further analysis is needed.