We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15083
    • 697 Posts
    Hi guys,

    We are using MODx revolution in a load balanced setup.
    I have followed the instructions here and have got the system up and running:
    http://rtfm.modx.com/display/revolution20/modRegistry#modRegistry-RegisteringLoadBalancedWebNodesforRemoteCommands

    Problem: The problem we are encountering with this approach to distributed caching is that if a site gets low traffic (ie the site is only launching) the number of registered nodes might not represent all available web nodes. Example:

    User x hits node 192.1.1.1
    This node registers itself using modRegistry.
    The CMS user makes a change and triggers a clearcache.
    User x hits node 192.1.1.2 (3/4/5/6/7) etc and gets old content.

    Basically the user needs to hit the same box twice to get the new content, or at least another box that was registered at the time of the clear cache. What we are noticing is that our clients are saving changes and not seeing them updated on the frontend, which is causing them concern (and rightly so!) I find it very difficult to explain how the above works to them, hence the issue sad

    Question: Is there a way to avoid the above without moving away from a distributed cache?
    It seems that the more nodes added, the more chance the user has of seeing out of date content, if the overall website traffic is low?

    Is there any solution to the above.
    At the moment I have each node registering for 2 hours. Would it make sense to have them register indefinitely, so "someone" would only have to hit all boxes once, and when the clearcache fires it goes to all nodes.

    Any help and or advice appreciated smiley

    J

      • 22303 MODX Staff
      • 10,725 Posts
      You could try having the command execution part of the RemoteCommands plugin execute OnHandleRequest, before the request is handled and have it reload the new Context data before proceeding. But I would leave the part that registers the node executing OnWebPageComplete.
        • 15083
        • 697 Posts
        Thanks for the reply opengeek.
        We do have memcache available, but I had issues getting it working correctly as the publish/unpublish stopped working for me.

        Is there directions on how to switch an entire MODx cache to use memcache, ie what system settings to I need to add/amend?
          • 15083
          • 697 Posts
          Anyone?
          there is one document on the MODx docs, buts its a one liner.
          Can I just set the memcache_server and swap the cache_handler to switch the entire cache to memcache?