Hi!
Probably a relevant question for Stas given the varying measurements: is the TPF server being fronted by a cache?
Yes, they are all behind varnish. It should be pretty easy to bypass it though - IIRC it's URL-based, so adding something like &dontcache=<random number> to the URL would bypass the cache.
Here's an example NGINX config I use on fragments.dbpedia.org: https://gist.github.com/RubenVerborgh/6d4ac975f0f36b6d296295dd2160c50f
Our nginx config is here: https://github.com/wikimedia/operations-puppet/blob/production/modules/wdqs/...
Note that this is only the backend stuff, frontend caching is handled by varnish cluster, which is kinda complex, docs are here: https://wikitech.wikimedia.org/wiki/Caching_overview
If you see anything that can be improved, please tell.