LoadBalancing in 6 steps

blog header image

Allan: Occasionally I rent out space on my blog to selected guest blogger's. Today's post is by guest blogger and esteemed colleague, Michael Knudsen.

 

I have tried to make a list of things that must be done to make the cache update work with EPiServer CMS 5 SP2 and up in a Load balanced setup.

Note this is a list of items taken from other documentation and collected here.

Things that need to be done to get Load balancing to work with EPiServer CMS 5 SP2 and up:

  1. The first thing to do is to test the network with the listening/broadcasting tool that Paul has provided in this Forum entry.
    On 1 server you configure the tool to send a message out over the network and all the other servers you run the tool as is (listening).
    To send run the tool like this: “C:\nlb>EPiServerRemoteEventsListener.exe send” and simply write a small text message.
    To listen simple run the tool as is “C:\nlb>EPiServerRemoteEventsListener.exe”.
    After sending a message it will automatically show up on the servers listening.
    If it does not please contact the network people that configured the server setup and make sure the network supports UDP broadcasting on at least one port..
  2. In the <site> section in Web.config ensure that the <siteId> values are all the same on each of the servers.
  3. In the <siteSettings> section in Web.config ensure the following values are set as shown:
    <configuration>
      <episerver>
        <sites>
          <site>
            <siteSettings enableEvents="true" enableRemoteEvents="true">
    If enableEvents is set to true but enableRemoteEvents is set to false then any events raised will only be distributed to subscribers within the same site. For load balanced or enterprise sites then enableRemoteEvents must also be set to true so that the events can be distributed to other sites both on the same server and other servers.
  4. In the <httpModules> section in Web.config ensure the <add> element for the EventSubscriberHostModule is not commented out:
    <configuration>
      <system.web>
        <httpModules>
            <add name="EventSubscriberHostModule" type="EPiServer.EventSubscriberHostModule, EPiServer" />
  5. In the <configuration> section in Web.config ensure the following <system.serviceModel> section exists and is NOT commented out.
    Note that if a special port was opened for the UDP broadcast then this port must be configured in the <endpoint’s shown below.
    <system.serviceModel>
        <extensions>
          <bindingElementExtensions>
            <add name="udpTransport" type="Microsoft.ServiceModel.Samples.UdpTransportElement, EPiServer.Implementation" />
          </bindingElementExtensions>
        </extensions>
        <services>
          <!-- Before deployment, you should remove the returnFaults behavior configuration to avoid disclosing information in exception messages -->
          <service name="EPiServer.Events.Remote.EventReplication" behaviorConfiguration="DebugServiceBehaviour">
            <endpoint name="RemoteEventServiceEndPoint" contract="EPiServer.Events.ServiceModel.IEventReplication" binding="customBinding" bindingConfiguration="RemoteEventsBinding" address="soap.udp://239.255.255.19:5000/RemoteEventService" />
          </service>
        </services>
        <client>
          <endpoint name="RemoteEventServiceClientEndPoint" address="soap.udp://239.255.255.19:5000/RemoteEventService" binding="customBinding" bindingConfiguration="RemoteEventsBinding" contract="EPiServer.Events.ServiceModel.IEventReplication" />
        </client>
        <behaviors>
          <serviceBehaviors>
            <behavior name="DebugServiceBehaviour">
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <bindings>
          <customBinding>
            <binding name="RemoteEventsBinding">
              <binaryMessageEncoding />
              <udpTransport multicast="True" />
            </binding>
          </customBinding>
        </bindings>
      </system.serviceModel>
  6. The address attribute values in both the service and client endpoint sections specify a UDP multicast address and port. This may be changed as desired but the IP address MUST be a UDP multicast address. Firewalls will need to allow communication on the port chosen if multiple servers are used and are separated by firewalls.
Recent posts