Copied to clipboard

Flag this post as spam?

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


  • sarath 1 post 71 karma points
    Apr 22, 2020 @ 07:05
    sarath
    0

    hi, i am facing a problem in distributed calls, it was working in umbraco 7,when i add this in umbracosettings.config file

    <distributedCall enable="false">
        <!-- the id of the user who's making the calls -->
        <!-- needed for security, umbraco will automatically look up correct login and passwords -->
        <user>0</user>
    
        <!--
        When distributed call is enabled, you need to add all of the servers part taking in load balancing
        to the server list below. 
        -->
    
        <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.
    
          Examples:
    
          <server>127.0.0.1</server>
          <server forceProtocol="http|https" forcePortnumber="80|443">127.0.0.1</server>
    
          Generally when setting up load balancing you will designate a 'master' server, 
          Umbraco will always assume that the FIRST server listed in this list is the 'master'.
          (NOTE: Not all load balancing scenarios have a 'master', depends on how you are setting it up)
    
          In order for scheduled tasks (including scheduled publishing) to work properly when load balancing, each 
          server in the load balanced environment needs to know if it is the 'master'. In order for servers
          to know this or not, they need to compare some values against the servers listed. These values
          are either: serverName or appId. You should not enter both values but appId will always supersede serverName.
          The serverName is the easiest and will work so long as you are not load balancing your site on the same server.
          If you are doing this, then you will need to use appId which is equivalent to the value returned from
          HttpRuntime.AppDomainAppId. It is recommended that you set either the serverName or appId for all servers 
          registered here if possible, not just the first one.
    
          Examples:
    
          <server serverName="MyServer">server1.mysite.com</server>      
          <server appId="/LM/W3SVC/69/ROOT">server1.mysite.com</server>      
          -->
    
        </servers>
      </distributedCall>
    

    but when i try to add the same configuration in umbraco 8 i am getting an error on application run saying that nullpointer exception,

    enter image description here

    please help me to resolve this issue or any workarounds to solve this issue, very urget

  • Marc Goodson 2123 posts 14214 karma points MVP 8x c-trib
    Apr 22, 2020 @ 08:11
    Marc Goodson
    0

    HI sarath

    Distributed Calls is the original way to do load balancing with multiple Umbraco sites, back through version 4,6 and the start of the 7 series.

    Essentially when you published a page from your Umbraco backoffice, a web request would be made to each of the servers configured in DistributedCalls, to tell them that something new had been published, and that they needed to refresh their local versions of the Umbraco cache to display the published content.

    In V7, a new 'database' driven way of managing loadbalancing was introduced, called 'Flexible Load Balancing' when an item is published on the Umbraco backoffice, an 'instruction' is inserted into a database table... other servers in the load balancing check that table for new instructions, and if they fine one refresh their local version of the Umbraco cache.

    The DistributedCalls configuration was kept alongside the 'Flexible Load Balancing' for backwards compatibility, as people's existing sites would be upgraded and they might have been using DistributedCalls, and weren't ready to switch to Flexible Load Balancing.

    In V8 however, DistributedCalls method for Load Balancing has been removed, so there is no need for the Distributed Calls configuration in the umbracosettings.config file, and if you add it, it will just error!!!

    There is a reasonably detailed explanation of setting up Load Balancing with V8 here:

    https://our.umbraco.com/documentation/getting-started/setup/server-setup/load-balancing/

    but that's why you are seeing the error with DistributedCalls config in V8!

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft