Copied to clipboard

Flag this post as spam?

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


  • Aileen 59 posts 79 karma points
    Jan 16, 2012 @ 13:38
    Aileen
    0

    Load Balanced Environments

    Hi

    Does anyone know how Courier 2.5 works in a load balanced environment?

    Thanks

    Aileen

  • Nic Wise 51 posts 85 karma points
    Jan 16, 2012 @ 13:53
    Nic Wise
    0

    Works fine for us, however we serve all content off a CDN, not off the cluster, and we only courier content and structure, never files (except media) so... Anything which the user didn't directly enter (ie, media) comes from source control, and is pushed to the stage and live servers manually.

    I suggest you courier to a single node, and then use something in the background to sync the folders to the other nodes.

  • Per Ploug 865 posts 3491 karma points MVP admin
    Jan 16, 2012 @ 14:06
    Per Ploug
    0

    Courier supports the default load balancing supported by umbraco, so it ensures cache is reset on each instance, using the build-in load balancing in umbraco.

    for files or anything beyond that, Courier doesn't do anything as that all depends on your specific setup

  • Paul Stoker 39 posts 72 karma points c-trib
    Oct 15, 2015 @ 16:32
    Paul Stoker
    0

    Hi Per,

    I have tested Courier in a load balanced environment (both using a web share and DFS) and I don't believe Courier works correctly as the Lucene Indexes are not kept in sync.

    My setup: I have an Authoring server, and two load balanced Production servers ( Production A + B) running DFS. Distributed calls are configured correctly for the two to communicate.

    Umbraco works: When I publish a page directly from Production A using the Umbraco admin then I use the site search on either Production A or B then I find the new page immediately. Distributed calls appear in the Log files.

    Courier does not work: When I publish a page from Authoring and then use Courier to publish it to Production A. I can see the page on both Production A and B. However the site search does NOT show the new page on Production B. Distributed calls do NOT appear in the Log files.

    I believe the bug is within Courier and it does not correctly publish the pages on the target server - hence the distributed calls are not made. I know the distributed calls aren't made as I checked the logs.

    The question is how can I fix this and is anyone else experiencing this problem?

  • David Peck 690 posts 1896 karma points c-trib
    Aug 25, 2017 @ 15:18
    David Peck
    0

    Hi Paul,

    I know this is 2 years old but we have the same issue. Did you ever find a workaround?

    I've logged the issue: http://issues.umbraco.org/issue/COU-614

  • Aileen 59 posts 79 karma points
    Jan 16, 2012 @ 15:34
    Aileen
    0

    Thanks for the quick replies. We haven't setup load balancing yet so will take this into consideration.

  • Mike Olund 45 posts 66 karma points
    Jan 18, 2012 @ 19:02
    Mike Olund
    0

    Has anyone tried writing a customer provider that publishes to multiple endpoints. 

    I'd like to be able to publish to two CourierWebserviceRepositoryProvider's and two NetworkShareProvider's with a single transfer. 

    The interface is pretty well documented.  It looks like it might be possible?

  • Mike Olund 45 posts 66 karma points
    Jan 19, 2012 @ 01:04
    Mike Olund
    0

    I tried creating my own RepositoryProvider but its a bit more complicated than I originally thought. 

    Instead I ended up using an aspx page with no code-behind.  Just save it with a *.aspx extension and put in in the /umbraco folder of the site. 

    This is based on page 9 of the pdf documentation at http://our.umbraco.org/FileDownload?id=2759

    <%@ Page Language="C#" %>
    <%@ Assembly Name="Umbraco.Courier.Core" %>
    <%@ Import namespace="Umbraco.Courier.Core.Storage" %>
    <%@ Import namespace="Umbraco.Courier.Core.Services" %>
    <!DOCTYPE html>
    <html>
    <head></head>
    <body>

    <%
    var repoStore = new RepositoryStorage();
    var repositories = repoStore.GetAll();
    repoStore.Dispose();

    if (Request.ServerVariables["REQUEST_METHOD"] == "POST") {

        string selectedRevision = Request.Form["revision"];
        var transferring = new Transfering();

        foreach (var repo in  repositories) {
            transferring.CommitRevision(selectedRevision, repo.Alias);
        }

        transferring.Dispose();
    }
     %>

    <form method="post">

    <h4>Revisions</h4>

    <select name="revision">
    <%
        var revisionStore = new RevisionStorage();
        var revisions = revisionStore.GetAllLocalRevisions();
        revisionStore.Dispose();

        foreach (var revision in revisions) {
            Response.Write("<option>" + revision + "</option>");
        }
    %>
    </select>

    <h4>Repositories</h4>

    <ul>
    <%
        foreach (var repo in  repositories) {
            Response.Write("<li>" + repo.Alias + "</li>");
        }
    %>
    </ul>

    <h4>Publish</h4>

    <input type="submit" value="Publish Selected Revision to All Repositories" />

    </form>

    </body>
    </html>

     

  • Per Ploug 865 posts 3491 karma points MVP admin
    Jan 20, 2012 @ 13:53
    Per Ploug
    0

    Hi mike

    There has been added some high-level apis for handling these things a better cleaner, check the sample folder for courier on nightly.umbraco.com the ExtracionConsole sample app shows how you can push to a single target, but no reason why you can't  do that to multiple targets

    Still if its to solve a load-balancing issue, the solution would more likely be to push to a single instance and have that instance distribute files and database to the other instances, using a shared DB and have resources on a NAS (or sync)

    /per

Please Sign in or register to post replies

Write your reply to:

Draft