0

I have clustered Magento in Google Cloud, and i have 2 frontend webservers, 1 admin + nfs server (here it goes mystore/admin session) and 1 database.

Since files on frontend webserver are delivered from nfs to then via nfs share (only /var and /media) and lsyncd for rest of files, i was wondering if anyway admin people works only on /admin dedicated VM, frontend webserver only needs to read Magento files, correct? Session and cache is inside Redis dedicated instaces on database VM

If answer is yes (and i asking this question here becouse i think is more a developer/magento question rather then ServerFault) i could just mount the NFS (/admin vm) vm harddisk where Magento is located in Read only mode directly to webservers.

thank you

11
  • As long as all the extensions you're going to use with your Magento installation are properly written, this (/var & /media) should work. If session is not within redis, it will go into the database. Otherwise even if session goes to files, it's within /var so should never be a problem. Take care there is no directory named "magento" below /tmp.
    – hakre
    Jul 26 '15 at 21:57
  • so, it is possible for me to just have read-only harddisk on frontend servers, since they will not write to disk, correct?
    – x86fantini
    Jul 26 '15 at 22:06
  • Yes, that should normally be the case. The code and configuration should not be writeable in a properly set up server environment. The directories /path/to/project/www/var (Variable files—files whose content is expected to continually change during normal operation of the system—such as logs and cache files) and /path/to/project/www/media (media files like product images in diverse dimensions) need to be writeable for the server-user executing the code on. Perhaps it's not the best idea to run /var via NFS but you'll find out, give it a try. /media has far more reads than writes.
    – hakre
    Jul 26 '15 at 22:12
  • In my question, there are 2 different scenarios. actual-scenario is 2 frontend with magento on them via nfs+lsyncd, to-be-scenario is readonly hdd for frontend webserver. From @hakre answer is like you are concentrating on "nfs" scenario, whitch i tend to avoid...
    – x86fantini
    Jul 26 '15 at 23:13
  • Ah, that wasn't clear to me, thanks for adding up. And it's not an answer, it's just a comment. And if you have the frontends read-only, then you have a problem as /var and /media is always expected to be writeable. I don't think that Magento will continue to properly work when you make these folder read-only, too.
    – hakre
    Jul 27 '15 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.