We have multiple web heads running our Magento instance and have previously used NFS to share directories such as pub / media var / log var / report, etc. We have an NFS mount on a shared server to a single NFS mount point on each web head with pub and var. For each deployment, we link the newly deployed directories of var / log and var / report to the shared directory var / log and var / report which works well however:
I noticed that there are files in the root directory of the var application such as * .pid files and .lock files, which makes me think that we should be sharing everything var directory via NFS, not just var / log and var / report. Sure, it's easy to change my nfs timeline and symbolic links, but as soon as I do, var / view_preprocessed stops working, unless the Magento setting of "Allow symbolic links" is enabled. If I enable this setting, everything works as expected and the var directory is shared without problems, but the setting "Allow symbolic links" is not a recommended setting for production for security reasons.
So, in short, my question is whether these .pid files should be shared between web heads and if so, what is the best approach to do so so that all web heads can be synchronized without compromising security by enabling " Allow symbolic links "?