This project is read-only.

Microsoft NLB (Network Load Balancing) Support

Topics: ASP.NET 2.0
Sep 29, 2008 at 1:59 PM
Hi everyone,

I was wondering if BlogEngine.Net supports Microsoft NLB (Network Load Balancing). Is there any warnings or considerations in order to get NLB working nicelly ?

Thanks for your help.
Sep 29, 2008 at 8:53 PM
BlogEngine is currently configured to only work on a single server.  So NLB would not be an option for you.
Sep 30, 2008 at 7:44 AM
Thanks for your answer.

Any idea / guidelines on how I could get BlogEngine to support NLB ?
What would be my options if I really wanted to support NLB ?

Sep 30, 2008 at 5:01 PM
NLB is only really designed to host static content, so if you really needed a redundant/load balanced solution, you'd have to configure as follows.
  • Configure a MS SQL cluster, get that working correctly first.
  • Configure your NLB as per normal, copy your BlogEngine files to each server node.
  • Configure to use the MS SQL database for back end storage for each node.
This is one hell of a lot of work to achieve redundancy/load balancing. If you've just got an NLB cluster that you need to use, you can use a separate SQL server of any flavour supported to hold the data. XML storage won't work at all, because when a file is created on one NLB node, it won't be created on another, hence the need for a separate SQL server.

Hope that sheds some light on your problem - if it's not clear drop me a message!

Sep 30, 2008 at 5:52 PM
Well, as I mentioned earlier... BlogEngine isn't designed for hosting on multiple servers.  The reason is because BlogEngine loads the content into memory when it starts up.  So even hosting the information on a back end SQL server doesn't provide multiple servers with the same content.  As soon as someone makes a comment, or you add a new post, or whatever, the content on one server will not be the same as on the other server.

Unfortunately this is a design decision of BlogEngine at the moment.  This might change in the future, but for now that's how the core was built.  Assuming you are looking for load sharing and/or high availability, I can't think of any way to achieve either with the current BlogEngine design.

Oct 1, 2008 at 8:54 AM
Ah of course - sorry dscoduc I forgot that the data is cached in memory. It would be really inefficient, but couldn't you use something like BlogEngine.Core.Post.Reload(); to force the cache to update? I wrote a post on how to force the BlogEngine cache to update after an import when it's not showing imported data - perhaps this approach would get somewhat nearer to NLB functionality?
Oct 1, 2008 at 7:12 PM
Better than nothing, I suppose.  However, if you are deploying a blog solution in an environment where downtime is unacceptable, or you anticipate large amounts of users banging away at your blog, perhaps you would want something made to scale to those requirements.  BlogEngine.NET is way cool, for sure, but if I was responsible for deploying an enterprise blog solution I'm not sure I would choose BlogEngine.NET (mainly for the caching nature of the solution)...