Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrew Rees 6 posts 36 karma points
    Jan 24, 2013 @ 12:27
    Andrew Rees
    0

    Configuring publish notifications on a load balanced environment

    Hi,

    We've got a website set up on an envionment consisting of two load balanced web servers, and DFSR for file replication.

    The users of the site have set up notifcations for the "Send to Publish" and "Publish" events, and experience weird issues with the publish notifications.  When a document gets published, a user gets sent a notification email from both servers, and even weirder instead of the name of the user who published the page, the email always says "Published by admin user".

    The site itself is on 4.7.0, but I've replicated the same behaviour on a local 4.11.3 installation.  Originally the publish email notifications work correctly, but as soon as I change <distributedCall enable="false"> to <distributedCall enable="true"> the weird behaviour described above starts occurring.

    The full section of the config of my local install is below, and the site is installed on port 8084.

    <distributedCall enable="true">
        <!-- the id of the user who's making the calls -->
        <!-- needed for security, umbraco will automatically look up correct login and passwords -->
        <user>2</user>
        <servers>
          <!-- add ip number or hostname, make sure that it can be reached from all servers -->
          <!-- you can also add optional attributes to force a protocol or port number (see #2) -->
          <!-- <server>127.0.0.1</server>-->
          <!-- <server forceProtocol="http|https" forcePortnumber="80|443">127.0.0.1</server>-->
          <server>127.0.0.1:8084</server>
        </servers>
    </distributedCall>

    Looking through the documentation I can't see anything I have not configured, so was wondering if anyone else has stumbled across this annoyance, or know of a workaround as it's driving our client mad at the moment!

     

    Thanks

    Andrew

     

  • Ian Smedley 97 posts 192 karma points
    Jan 25, 2013 @ 11:42
    Ian Smedley
    1

    When distributed calls are enabled - it will send the a publish event to ALL servers listed (and they all need to be listed) the calls will use the userId defined in the config (I never change this from the default - admin)

    Whilst we run all our sites in a load-balanced environment, we've never used the "send to publish" notifications - but the UmbracoLog table will show two distinct publish events as each server publishes the content, individually.

    I expect that the notifications are 'by design' though I can see that they'd be nusiance, perhaps this could be listed as a change?

    Hopefully this explains at least why it's happening.

  • Luke Goodrich 9 posts 29 karma points
    Jan 25, 2013 @ 12:19
    Luke Goodrich
    0

    We use this publish strategy but use a high availability share rather than DFS.

    Configuration looks something like;

      <distributedCall enable="true">
        <user>0</user>
        <servers>
          <server>web001.mysite.com</server>
          <server>web002.mysite.com</server>
          <server>web003.mysite.com</server>
          <server>web004.mysite.com</server>
        </servers>
      </distributedCall>

    On each publish the server contacts each of the other servers to notify that a publish has occurred.

    Possible gotchas

    - IIS bindings - in this configuration IIS needs to bound to the dedicated hostname as well as the web site hostname, i.e. IIS on web001 might need to be bound to web001.mysite.com and www.mysite.com.

    - Connectivity - Each server must be contactable from each of the others as any one in the cluster can initiate the publish. It's painful but it's worth checking connectivity from each server to all the others. If servers are multihomed (e.g. separate mgmt LAN) this might not be as simple as it seems. To check this log into web001 and open browsers to web002.mysite.com, web003.mysite.com and web004.mysite.com and make sure a page is returned. Repeat on each server checking connectivity to other nodes.

     - By default the XML disk cache is inside the config folder which DFS might pickup and try to replicate - this is bad. We turn the XML file cache off which means the web server queries the database as Umbraco starts. We have a big database server as we host with a much bigger business application so the hit is negligible for us. Newer versions of umbraco have the key umbracoContentXMLUseLocalTemp which I believe means umbraco.config is written to the temp folder instead. This should be much better, though I haven't used it myself.

    - Publish results can be erratic when a server is missing from the cluster. If a server is out for any significant period remove it from umbracosettings.config

     

    HTH

Please Sign in or register to post replies

Write your reply to:

Draft