A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

Should read-only API requests also use maxlag?

LucasWerkmeisterWMDE

Should tools sending API requests that don’t intend to change anything (action=query, action=compare, action=wbgetentities, etc. – perhaps “any request that doesn’t need a token) still specify maxlag=5? Or is maxlag mainly intended for requests that might otherwise exacerbate the replication load?

This question was raised over a decade ago on Manual talk:Maxlag parameter#Usage question, but never answered there. I’ll make sure to copy the answer there if anyone answers here :slight_smile:

Ciencia-Al-Poder

I think read-only requests don’t increase nor decrease the replication lag. For me, it shouldn’t be necessary. However, someone more authoritative than me should confirm.

Reedy

https://www.mediawiki.org/wiki/API:Etiquette#Use_maxlag_parameter

If your task is not interactive (i.e. a user is not waiting for the result) you should use the maxlag parameter.

LucasWerkmeisterWMDE

And if the task is interactive, I should not use it? (My specific case is this tool, by the way.)

Reedy

You can use it if you want still use it if you want, but you don’t have to :slight_smile: