Page MenuHomePhabricator

Make generating Add Link suggestions on-the-fly production ready
Open, Needs TriagePublic

Description

In T378536, we explored an approach to request link-recommendations on the fly. While that approach works in principle, it does have the side effect of creating additional requests to the Wikimedia Link Recommendation Service in a manner that is affected by users.

This opens the possibility for a malicious user to overwhelm the service by triggering too many requests.

This tasks exist for exploring and implementing mitigations and make loading link-recommendations on the fly viable in productions.

Possible strategies to explore:

  • storing for which pages no recommendations are available and not re-requesting them
  • limiting the set of users who can call the API more strictly to the same set of users that are provided the module by default
  • aggressively rate-limiting the requests to the API on a per-user basis (1 request per minute?), or per feature basis (PoolCounter?)
  • ...

Event Timeline

Change #1105384 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] fix(surfacing): rate-limit requests to internal linkrecommendation api

https://gerrit.wikimedia.org/r/1105384

Change #1105385 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] fix(surfacing): only give link-recommendations to 0 edits users

https://gerrit.wikimedia.org/r/1105385

Change #1105384 abandoned by Michael Große:

[mediawiki/extensions/GrowthExperiments@master] fix(surfacing): rate-limit requests to internal linkrecommendation api

Reason:

We don't seem to go this route, but rather aim to collect all by iterating through pages, see T386250 and I393d549cf2d

https://gerrit.wikimedia.org/r/1105384

Change #1105385 abandoned by Michael Große:

[mediawiki/extensions/GrowthExperiments@master] fix(surfacing): only give link-recommendations to 0 edits users

Reason:

Not needed anymore, we're now checking whether link recommendations exist in the before hook and will likely add them there to the page right away, so we probably can abandon this api endpoint completely soon

https://gerrit.wikimedia.org/r/1105385