LoadBalancing in 6 steps

by: Allan Thræn

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.

Suggested reading for load balancing is:

http://world.episerver.com/en/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-SP2/Configuring-EPiServer-CMS-5-Enterprise/

http://world.episerver.com/en/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-SP2/Event-Management-System-Specification/

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:
    http://world.episerver.com/Forum/Pages/Thread.aspx?id=15827&epslanguage=en
    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.

12 November 2008


Comments

  1. If you are running IIS7, change step 4 to:
  2. hehehe. It strips the xml tags... nice... I'll try without the tags: BEGIN-TAGsystem.webServerEND-TAG BEGIN-TAGmodules runAllManagedModulesForAllRequests="true"END-TAG BEGIN-TAGadd name="EventSubscriberHostModule" type="EPiServer.EventSubscriberHostModule, EPiServer" /END-TAG
  3. Thanks very much for the list, really useful!
  4. Really helpful thanks! One question: If I have multiple different sites on the same load balanced pair of servers, should I configure each site pair to use a different multicast port per pair, or can I leave them all on the same multicast address/port. I assume the messages are filtered by the application by SiteID ?
  5. Thank you! You saved my day (and probably the upcoming night as well!)
Post a comment    
User verification Image for user verification  
Allan Thræn

About me

I am a product manager @ EPiServer, with a passion for the more geeky side of things. My technical interests are typically focused around user problems, user experience,  search, information management, artificial intelligence and  personalization

On top of this blog I have the blog Allan On Technology and I often crosspost.

DISCLAIMER: Unless otherwise stated in the posts, this blog expresses my personal opinions, experiments and views, not necessarilly the views of EPiServer AB.

 1668 page views this week.

 

 

Syndications


Archive


Tag cloud

EPiTrace logger