php - Uploading new version of a core file on running website without maintenance mode -


let's have website running on php using kernel pattern. let's have 1000 requests per second accessing kernel.php file. want upload new version of file without turning on maintenance mode. safe it? can upload new file , @ point requests handled new one?

  • kernel.php error free sure
  • the file included require_once() in index.php
  • forget maintenance mode in case, please

i told add information why thought approach.

we trying develop system providing possibility of updating, part of webpage, driven our engine. kernel example - if file can modified without maintenance mode, in opinion, other less important might well.

sometimes update simple turning on maintenance mode stopping military invasion on country because 1 of privates (soldier) sneezed.

since talking blowing things , inter-process communications: none of risk uploading core files on running website without freezing request few seconds, how template files? it's of course rhetorical question, think understand of it.

turn on php opcode caching web server, , set interval 5 minutes or more.

you can copy files overtop of running php code, , next time interval expires server check modifications , recompile opcode. you'll have wait few minutes before notice change, because server continue use cached code until expires.

i can not advise happen if break dependencies amount php files, or if server update 1 file have different cached copies of other files.

for reliable method. need use feature in web server allows hot swap directory host. install complete new copy of php code new directory, , hot swap host new location. no requests should interrupted.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -