smithsson68@gmail.com
Jun 29, 2010
  19183
(5 votes)

Online Center / Admin Plugin for EPiServer Events System (Load Balancing)

From EPiServer CMS 5 we introduced a new system for load balancing called the EPiServer Events System. See here for more information.

The system uses Windows Communication Foundation (WCF) under the covers to communicate “events” between servers running EPiServer CMS, both in a standard and enterprise load balanced site. One of the most common events sent by the system is when a CMS page is updated and the PageData object in the Http cache should be removed.

It can sometimes be quite difficult to see if the Events System is working, pages get changed on an edit server but other servers in the cluster still show the old version of the page for example. With that in mind (and tens of support cases dealt with), I decided enough was enough, something had to be done to give some visual indication to the site admin that the EPiServer Events System is working, or if not, why not.

EPiServer Events Monitor Gadget

The gadget has 3 views:

System Status

EPiServer Events Monitor System Status View 

As you see the system health does not look too good for this site. This is the default state of the EPiServer Events System for a newly installed CMS 6 site. You can see that the required WCF Client and Service Endpoints are missing. The other 2 errors are also caused by the endpoints being missing. To fix the problem we just need to uncomment the client and service endpoints for the EPiServer.Events.ServiceModel.IEventReplication contract that should be present in the web.config system.serviceModel element but currently commented out:

  <system.serviceModel>
<client>
<endpoint name="RemoteEventServiceClientEndPoint"
address="soap.udp://239.255.255.19:5000/RemoteEventService"
binding="customBinding"
bindingConfiguration="RemoteEventsBinding"
contract="EPiServer.Events.ServiceModel.IEventReplication" />
</client>
<services>
<service name="EPiServer.Events.Remote.EventReplication">
<endpoint name="RemoteEventServiceEndPoint"
contract="EPiServer.Events.ServiceModel.IEventReplication"
binding="customBinding"
bindingConfiguration="RemoteEventsBinding"
address="soap.udp://239.255.255.19:5000/RemoteEventService" />
</service>
</services>
</system.serviceModel>

After the above problems have been fixed and Online Center refreshed we should then see a nice column of green ticks and the system should now be fully operational.

EPiServer Events Monitor System View

System Test

The System Test view allows you to send and receive a test event. This can be good when the System Status view reports a healthy system but you just want to make sure that event messages are flowing between servers / enterprise sites as desired.

EPiServer Events Monitor System Test View

Event Statistics

The Event Statistics view shows real-time numbers of events raised, missed, sent out and received in.

EPiServer Events Monitor Event Statistics View

The raised count should be equal to the total sent out and received in. An event is treated as missed if events of the same type from the same server are received with later sequence numbers than the next one expected after a time period has expired (currently 5 seconds).

As the upcoming Relate+ 2.0 and EPiServer Community 4.0 releases also use the EPiServer Events System, this gadget can also be used in conjunction with these products too.

EPiServer Events Monitor Admin Plug-in For CMS 5 R2

As EPiServer CMS 5 was shipped before the release of OnlineCenter I have also built a CMS 5 Admin Plug-in version which has the System Status and System Test views. The Events Statistics view is not available in this version as that relies on new functionality introduced in the EPiServerFramework released with CMS 6 / Community 4.0.

Once installed, the plug-in should be visible in CMS Admin Mode under Tools on the Admin tab.

Downloads

EPiServer Events Monitor Gadget

(for CMS 6, CMS 6 R2, Community 4, Community 4 R2, Relate+ 2, Relate+ 2 R2)

EPiServer Events Monitor Admin Plug-in

(for CMS 5 R2 SP2)

To install these modules on a site, start the EPiServer Deployment Center, select the “Install a Module from a Compressed File” from the tree and then click “Run”. When prompted select the epimodule file downloaded and click “Next”. Proceed through the wizard selecting the CMS / Community / Relate+ site to install the module on.

Full source code

Feel free to change / adapt the source code as you wish but please let me know if you find any bugs (see below).

Feedback

Any comments or problems experienced are gladly received by email to paul <dot> smith <at> episerver <dot> com. Please note that these components and source code are provided as is without guarantee or warranty and are not officially supported by EPiServer AB.

Jun 29, 2010

Comments

Sep 21, 2010 10:33 AM

Awesome! Thanks Paul :-)

Jens Lundström
Jens Lundström Sep 21, 2010 10:33 AM

You answered my first question about Community 4.0, where did the replication settings go. Thank you!

Sep 21, 2010 10:33 AM

Really nice one, does this work for TCP setups as well or only UPD ?

Sep 21, 2010 10:33 AM

Works on whatever protocol you have configured the Events System to use.
/ Paul Smith

Sep 21, 2010 10:33 AM

Nice gadget, must install :-)
/ Jarle Friestad

Oct 26, 2010 02:06 PM

This one I must remember. Great tool to see what your attention should be directed at!

Lars Bodahl
Lars Bodahl Oct 26, 2010 02:32 PM

Great! Defenitely a must-have :) I've missed this a couple of times in the past while debugging in the cmd window.

(Can't believe I've missed this blog post for an entire month.... Thanx to Twitter for making me aware of it)

smithsson68@gmail.com
smithsson68@gmail.com Jan 27, 2011 05:04 PM

Updated the code to work with EPiServer Framework 6.2 (CMS 6 R2, Community 4 R2)

Jens Lundström
Jens Lundström Apr 14, 2011 07:56 AM

No less than expected from a man with your skills ; )

Excellent work, this might ease my and my customers lost-events-headache!

Svart Adam Solander
Svart Adam Solander May 2, 2011 10:47 AM

Unfortunately, I'm having a bit of trouble with the gadget. We are not using the CmsAdmins group so I tried to compile it without the Authorize attribute but when I try to run it on the server, I only get an error page that tells me "Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present".
Looks like a great tool from the pictures I've seen and the other reviews so I would much like to get it working. :)

Nov 23, 2011 02:57 PM

Assembly reference problems when running with .net 4.0 and newest version of CMS 6 R2

Mar 15, 2012 09:56 AM

Getting this to work with TCP was a bit of a headache. EPiServer wasnt registering the listener properly. I could get EPiServer to send messages to the other tool EPiServerRemoteEventsListener (which i configured to use TCP). It seems I had some configuration issues but my gripe is that EPiServer (this gadget) said everything was OK - green across the board. Sadly it wasn't. I did get it working eventually.

Chris Hopkins
Chris Hopkins Apr 2, 2012 01:29 PM

Installed this into our EPiServer solution however it doesn't appear in the Tools menu, checked the web.config and it has the correct tag with the EventsMonitor entry. Files have been successfully copied into the solution /modules folder, am I missing something here to get this to appear?

Adam Jenkin
Adam Jenkin Oct 24, 2013 09:24 AM

I have tried to install this module into an EPiServer 7 website but the gadget does not appear in the list for adding to the dashboard.

The registration in the web.config looks correct.

Can anyone hep?

Henrik Fransas
Henrik Fransas May 28, 2014 02:50 PM

I have a nearly working 7-version of this gadget, will publish a blog post when it is done

Janne Kuusela Kuusela
Janne Kuusela Kuusela Mar 12, 2015 12:36 PM

Henrik, did you ever finalize episerver 7 version?

Please login to comment.
Latest blogs
Copy Optimizely SaaS CMS Settings to ENV Format Via Bookmarklet

Do you work with multiple Optimizely SaaS CMS instances? Use a bookmarklet to automatically copy them to your clipboard, ready to paste into your e...

Daniel Isaacs | Dec 22, 2024 | Syndicated blog

Increase timeout for long running SQL queries using SQL addon

Learn how to increase the timeout for long running SQL queries using the SQL addon.

Tomas Hensrud Gulla | Dec 20, 2024 | Syndicated blog

Overriding the help text for the Name property in Optimizely CMS

I recently received a question about how to override the Help text for the built-in Name property in Optimizely CMS, so I decided to document my...

Tomas Hensrud Gulla | Dec 20, 2024 | Syndicated blog

Resize Images on the Fly with Optimizely DXP's New CDN Feature

With the latest release, you can now resize images on demand using the Content Delivery Network (CDN). This means no more storing multiple versions...

Satata Satez | Dec 19, 2024

Simplify Optimizely CMS Configuration with JSON Schema

Optimizely CMS is a powerful and versatile platform for content management, offering extensive configuration options that allow developers to...

Hieu Nguyen | Dec 19, 2024

Useful Optimizely CMS Web Components

A list of useful Optimizely CMS components that can be used in add-ons.

Bartosz Sekula | Dec 18, 2024 | Syndicated blog