On 09/01/2014 04:17 AM, Filippo Giunchedi wrote:
Anyways the easiest I think would be to just hit the public URL from the job and let varnish/etc do the rest, on the basis that URL will be hit by the user anyway (that's the case I'm assuming, correct?). If you want to future-proof it further you could hit the internal upload endpoint (upload.svc.eqiad.wmnet) with the right Host: header.
+1 to hitting the regular image scaling end points rather than doing the scaling right in the job runner. This lets us isolate image scalers from other tasks, which is an advantage from a security and monitoring perspective. It should also keep the actual job fairly simple.
Arguably this approach is also more flexible and future-proof, as it doesn't make strong assumptions about how image scaling is implemented behind the scenes.
Gabriel