I have simple files (php||javascript||...)
running in production
(apache+(php||javascript||...))
.
I am trying to think to the proper way of migrating a simple file while not stopping serving web clients.
Possible influences are:
- Apache cached files: I do not know how apache deal with files (php, img, ...). Does it cache them, and check for update timestamp to reload, or does it reload on each http request ?
- Linux files are changed in an atomic manner: If I
cp
a file with new content, apache can only see the full content final save results of my command ? - Apache execution process: Can I pause Apache, holding current requests, while copying new file versions.
I imagine the following:
- Have files, like php
require_once
file, named with versions (ex:ABusinessClassD-v1.0.php
), support backward compatibility, and simply do acp
of new files one by one, going from bottom up (database, static files (img, ...), php files, javascript files, ...) - Force refresh browser code on demand.
Imagination != as simple as this != Reality.
Please, can somebody summarize globally simple manual steps to update a simple file in an apache production, without stopping serving web clients, in a manual intentionally slow process ?