Page MenuHomePhabricator

Enforce a max number of active subscriptions per user
Closed, ResolvedPublic

Description

Background information

Follow-up from DBA review T246716#6324971, in order to avoid possible expensive DELETE queries and abuse of the platform, we should define a max number of subscriptions per user.

What

Do not allow the user to subscribe more than X devices for push-notifications

Open questions

Is it possible to have expired subscriptions that wasn't purged?

Acceptance criteria

  • User can't subscribe more than X devices
  • Update beta cluster config to account for the new limit enforcement

Event Timeline

See T259148 for a proposed implementation plan for handling expired subscriptions.

As for a specific max number of device subscriptions to allow per user, I would say that 10 seems like a reasonable maximum — relatively low, but still more than 99% of users will ever need. Of course we can always consider raising it if we get more than a few users complaining about it.

LGoto triaged this task as High priority.Aug 5 2020, 3:37 PM
LGoto moved this task from Needs triage to Upcoming on the Product-Infrastructure-Team-Backlog board.
Mholloway renamed this task from Define a max number of active subscriptions to Define a max number of active subscriptions per user.Aug 12 2020, 2:26 PM

The specific maximum number of subscriptions per user should be defined in configuration, and it should probably be up to @sdkim what it is. In the meantime I'll pick this up to add the basic capability.

Mholloway renamed this task from Define a max number of active subscriptions per user to Enforce a max number of active subscriptions per user.Aug 12 2020, 2:49 PM
Mholloway claimed this task.

Change 619856 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/extensions/Echo@master] Create and enforce a config setting for max subscriptions per user

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

Change 619856 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Create and enforce a config setting for max subscriptions per user

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

Change 621036 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[operations/mediawiki-config@master] [BETA] EchoPush: Set max subscriptions per user to 10

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

Change 621036 merged by jenkins-bot:
[operations/mediawiki-config@master] [BETA] EchoPush: Set max subscriptions per user to 10

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