-
Improvement
-
Resolution: Fixed
-
Minor
-
3.8
-
MOODLE_38_STABLE
-
MOODLE_38_STABLE
-
MDL-65794_master -
Here is a quick summary of calls to service-nologin.php
$ tail -n 100000 access.log | grep 'service-nologin' | cut --delim=' ' -f 11,12 | sed 's/sesskey=.*&/sesskey=xxx/' | sort | uniq -c | sort -hr
14722 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=core_output_load_template
1265 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=core_output_load_fontawesome_icon_map
769 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=core_get_string,core_get_string
725 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=core_get_string,core_get_string,core_get_string
457 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=core_get_string,core_get_string,core_get_string,core_get_string
237 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=core_get_string,core_get_string,core_get_string,core_get_string,core_get_string
200 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=core_get_string
9 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=25-method-calls
5 "POST /lib/ajax/service-nologin.php?sesskey=xxxinfo=11-method-calls
So roughly this means that 15% of the traffic that php is serving is a POST request to something which is not personalised to the user, and is global across the system. Templates are static. Strings are static, The icon maps are static.
None of this traffic needs to go to php, it could all be cached by varnish / CDN etc.
The sesskey in the url is pointless as far as I can see, and both the sesskey and the POST are preventing this from being cached further up the stack.
Most of these will need a revnumber / cache busting param, but that is already a solved problem and just needs to be applied here too.
So proposing to allow this endpoint to serve traffic via GET and not require the sesskey. If you try to call it this way with a web service which isn't readonly or requires a user then it should explode.
- caused a regression
-
MDL-66367 Caching of templates should use a new templaterev variable
- Closed
- will help resolve
-
MOBILE-3106 Use GET request to get site info to make redirects work
- Closed