For one of the PHP + MongoDB projects, it was necessary to implement horizontal scaling.
Given that several servers will be used, how best to implement the relevance of their own scripts? Different trifles appear quite often, how to update them from one centralized repository at once everywhere? sshfs, or gluster, or are there simpler ways? Ideally, I would like to have somewhere a directory with the core of the project that would be used directly by the other servers.
Caching is now organized in the file system, but, as I understand it, it will be necessary to make it common to all servers. How to do it better? To get one more DB under a cache, or somehow still to "get out"? We have a peculiarity - in the cache there is data with a total volume of several gigabytes, which change from a force once a year, and are used almost every minute, because of this, the cache did not once become done in redis. How to be with such data, also in the database? And which database for this to choose?
Do I understand correctly that with the horizontal scaling of the session, it is also necessary to store in the database?