Jump to content

IPB install on multiple server nodes. Is it possible?


Recommended Posts

Posted

Hi everyone,

I am building a IPB forum install that can provide failover capabilities, so I have a 2-node setup behind a load balancer. However, I find that IPB uses the filesystem is different ways, but I haven't enumerated them all.

First, the cache is on the filesystem. Am I right to think that switching over to Memcached would remove all files from being created in <install_dir>/cache?

Second, the uploads directory is local to the server. I was thinking that I could either restrict uploads all together, or create an NFS share that both servers can use to store uploads.

Third, hooks. They are installed via XML but they get written to the <install_dir>/hooks directory. Can that be on an NFS share or can it reside in a Memcache server?

Lastly, skin files. I think this is the same issue as file uploads, but I'm not sure.

Can anyone point me in the right direction?

Thanks in advance.

Edit: I see in ACP->System Settings->General Configuration, there is a CACHING_PATH setting, but I don't know if this is supposed to be set to an NFS share or not. If this is the case, my worry is that multiple servers writing to the same NFS cache directory will cause write locks.

Posted

Answers in order.

1. No, memcache is not a replacement for /cache directory. You need to replicate this directory to both nodes. This is NOT frequently updated, only when you alter settings/templates/etc kind of stuff.
2. You can do this in multiple ways. In IPB ACP > settings, you can set which node receives these files. Should be beside caching_path. Alternatively, you can get your load balancer to handle all the requests to upload to be directed to one of the nodes.
3. Once again, this is not what memcache is used for. It's used by IPB to hold much more volatile material such as cache of the user, posts, etc. Memcache exists to avoid db calls and excess calculations. Not hold your hooks. That would be VERY VERY bad.
4. See #1
5. http://community.inv...nfiguration-r34 . Once again, these caches are for rarely changing materials only. So, you won't have to worry about write locks.

Posted

Thanks Grumy. I didn't realize the cache directory was for long-lived items. It makes a lot more sense to use an NFS share now.

Can you expand a bit on installing hooks in a multi-node env please? If I install it on one node (since I'm load balanced to that node), I want the hook to be activated on all nodes at once. Can the hooks directory be hosted on an NFS share?

Posted

Answers in order.



1. No, memcache is not a replacement for /cache directory. You need to replicate this directory to both nodes. This is NOT frequently updated, only when you alter settings/templates/etc kind of stuff.





Thanks Grumy. I didn't realize the cache directory was for long-lived items. It makes a lot more sense to use an NFS share now.




The cache-folder is indeed capable of being frequently updated, even though you do not update the skins or languages as often. You have to remember this is where IPB logs SQL errors. It's also the place where it creates upgrade sql files during upgrades. You can also make IPB write content to files in the folder when using IPSDebug to debug stuff.

This should be on the NFS volume since IPB writes to it. But there are 4 php files located under skin_cache you would need to remember to update for each upgrade.

We have setup symlinks to the nfs-volume for the folders uploads, cache, hooks and public. The public-symlink isn't necessary, but you would need one pointing from public/style_css to the nfs-volume atleast.
Posted

Thanks Grumy. I didn't realize the cache directory was for long-lived items. It makes a lot more sense to use an NFS share now.



Can you expand a bit on installing hooks in a multi-node env please? If I install it on one node (since I'm load balanced to that node), I want the hook to be activated on all nodes at once. Can the hooks directory be hosted on an NFS share?



I don't see why it can't, It's pretty much along the lines of the cache dir, it isn't updated that often, only when you install/update a hook from the ACP.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...