Force delay on apache response times

apache-2.2apache-2.4

Is there a way to make an Apache response time to take at least 10 seconds?
It's fine if it takes more than 10 seconds but I would like the fastest response times to take at least 10 seconds.

Best Answer

You can do this with mod_lua in Apache v2.4 and possibly mod_python/mod_perl with Apache v2.2 or v2.4.

You register a handler than simply waits 10 seconds and then returns apache2.DECLINED to indicate it will not handle the request, which should then process normally.

There is an example handler in the mod_lua documentation: https://httpd.apache.org/docs/trunk/mod/mod_lua.html