-
Notifications
You must be signed in to change notification settings - Fork 54
Multi Server Setup
Due to the means by which Sitecore clears caches and updates indexes in multi-server configurations, you may encounter a race condition in which blog entries do not appear after publishing. The quick fix is to disable caching on the WeBlog sublayouts, and set Indexing.UpdateInterval to a more frequent schedule (5 minutes by default). See the following post from Alex Shyba for a more comprehensive solution.
Sync up Sitecore Search Index Update and HTML cache clear
For more information on search and indexing, see the <http://sdn.sitecore.net/Reference/Sitecore%206/Sitecore%20Search%20and%20Indexing.aspx Search and Indexing Guide>
WeBlog contains a WCF server and client to allow running the module in a multi-server environment. This is required as the comments will be collected and submitted on the delivery server but the master database where the comment item needs to be created is connected to the authoring server. The authoring server can be configured to host the WCF server that the client on the delivery server will call.
The App_Config\Include\WeBlog.config
file contains sample WCF configuration for both the server and the client.
The authoring server will host the WCF service which is exposed by the Sitecore.Modules.WeBlog.Services.CommentService
class. The following sample configuration shows what should be added to the web.config
file to host the service.
<configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="Sitecore.Modules.WeBlog.Services.CommentServiceBehaviour"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <services> <service name="Sitecore.Modules.WeBlog.Services.CommentService" behaviorConfiguration="Sitecore.Modules.WeBlog.Services.CommentServiceBehaviour"> <endpoint address="" binding="wsHttpBinding" contract="Sitecore.Modules.WeBlog.Services.ICommentService"> <identity> <dns value="localhost" /> </identity> </endpoint> </service> </services> </system.serviceModel> </configuration>
The delivery server also needs to be configured to call the WCF service on the authoring server rather than trying to create the comment in the locally connected master
database. The following sample configuration shows what should be added to the web.config
file to host the service.
<configuration> <system.serviceModel> <client> <endpoint address="http://[authoring server address]/sitecore modules/WeBlog/Comment.svc" binding="wsHttpBinding" contract="Sitecore.Modules.WeBlog.Services.ICommentService" name="WeBlogCommentService"> <identity> <dns value="localhost" /> </identity> </endpoint> </client> </system.serviceModel> </configuration>
Note: Replace [authoring server address]
above with the address of the application hosting the WCF server (Sitecore authoring server)
You'll also need to configure WeBlog to use the WCF server by changing the WeBlog.CommentService.Enable
Sitecore setting to true. You'll find this setting in the App_Config\Include\WeBlog.config
file.
<setting name="WeBlog.CommentService.Enable" value="true"/>