I’m building a site whose configuration data is held by a php file, with no more than 15 lines of variables.
Everything has worked well so far, but now I’m facing the need of defining more variables, and researching a little I found an article about Application Configuration in PHP, whose conclusions state that php files are the wost option when analyzing how they scale (Databases being the better choice).
What is the most recommended choice when deciding which format of configuration file to use?
I’m sorry, what?!
This is just weird, because you can scale php very well – just set up another server and that’s it, you’ve scaled your php twice.
Also keep in mind that there are opcode optimizers that will keep the parsed file contents in the memory.
Whereas scaling databases is a rocket science. Scaling databases is a tricky process, that involves good database internals and your OS knowledge.
So I wouldn’t refer to that article ever.
PS: looked at the article:
I cannot realize how just instantiating variables can be slower than reading from database (which includes connection overhead, reading from tables overhead, transmitting the data overhead and the same instantiating variables process in the end).
Xjust cannot be more thanX + Yby definition.