Page MenuHomePhabricator

Make the JobQueue compatible with the MediaWiki Single version HTTP routing system
Open, Needs TriagePublic

Description

In T384944, we experimented with an HTTP routing implementation that allows fine grained control over the pod group that serves an HTTP MediaWiki request. While the experimentation and PoC was successful (docs are at https://wikitech.wikimedia.org/wiki/Single_Version_MediaWiki and child pages), there are a number of leftovers. First among them is making the JobQueue system compatible. This is what this task is about

Plan

  • Host Header
  • Route to the proper set of pods

Host header

The MediaWiki Single Version relies on the Host HTTP header to achieve the routing. First part of the plan is to make the jobqueue send those host headers.

Currently the workloads serving the jobqueue are single VirtualHost MediaWiki pods, named collectively mw-jobrunner. Given the single VirtualHost and the default behavior of Apache to choose the last VirtualHost is nothing else matches, adding the Host header to every request should be a NOOP.

We will utilize the staging environment to prove that and then enable it everywhere.

Routing to the proper set of pods

The next part would be route the requests to the proper group of pods. For this, we will need to configure the jobqueue change-propagation installation to allow to vary per wiki the endpoint that jobs are being sent to.

Event Timeline

Change #1151698 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/deployment-charts@master] jobqueue: Set the host header in all jobs

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

Change #1151698 merged by jenkins-bot:

[operations/deployment-charts@master] jobqueue: Set the host header in all jobs

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

Mentioned in SAL (#wikimedia-operations) [2025-06-04T08:42:51Z] <akosiaris> deploy changeprop-jobqueue to set the Host HTTP header for submission of all jobs. T395451

Mentioned in SAL (#wikimedia-operations) [2025-06-04T09:14:54Z] <akosiaris> T395451 rollback the host header addition, this is erroring out, returning 3xx.

Mentioned in SAL (#wikimedia-operations) [2025-06-04T09:15:11Z] <akosiaris> T395451 rollback the host header addition, this is erroring out, returning 404s.

Mentioned in SAL (#wikimedia-operations) [2025-06-04T09:46:52Z] <akosiaris> T395451 deploy mw-jobrunner hot patch for VirtualHost selection, testing out that the single version change will work this time around.

Mentioned in SAL (#wikimedia-operations) [2025-06-04T09:52:14Z] <akosiaris> re-deploy changeprop-jobqueue to set the Host HTTP header for submission of all jobs. T395451

Change #1153578 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/deployment-charts@master] mw-jobrunner: VirtualHost priority to 0

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

Change #1153578 merged by jenkins-bot:

[operations/deployment-charts@master] mw-jobrunner: VirtualHost priority to 0

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