Web Farm

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/21/2010 8:07:48 PM
Gravatar
Total Posts 190

Web Farm

Hey Joe,

I remember something about product offering you were working for managing concurrent installations of mojoPortal on a web farm. We're running two load balanced servers for our website hosting and that is certainly something we'd be interested in. If that's on a back shelf, is there anything other than what's in the Data folder that I'd need to worry about keeping synchronized?

Thanks,

John

1/22/2010 8:05:08 AM
Gravatar
Total Posts 131

Re: Web Farm

Hey John,

I recently asked the same question. Joe responded here   

 

As a follow up. I'm thinking about how to do this without changes to the code. I'm moving my site to a cloud based platform and am going to use a centralized storage device. I'll point the data directory to this device so that all web servers will have the same data directory. Everything else will be replicated across the web servers.

Not sure what issues I'll run into but I'll try and post results in the other thread once I give it a try.

1/22/2010 2:03:35 PM
Gravatar
Total Posts 190

Re: Web Farm

I think we could easily manage a shared directory for the Data folder. Then just configure both web servers with a virtual directory to the same Data folder. I hope that would be sufficient.

1/22/2010 5:19:23 PM
Gravatar
Total Posts 15

Re: Web Farm

Well, for starters you will have to adjust the logging.

Currently mojo writes the logs to the Data folder and they're named:

currentlog.config, currentlog.config.1 and so on. Each server would therefore attempt to log to the same filename and despite the robustness of log4net, there are some shortcomings.

1/23/2010 1:01:44 PM
Gravatar
Total Posts 190

Re: Web Farm

Thanks for the input, but could you elaborate on that just a bit more? What steps would you see as necessary for a workable solution? Do you think making the Data directory a virtual folder is not a good idea? Perhaps making certain subfolders under Data virtual?

1/24/2010 1:27:34 PM
Gravatar
Total Posts 131

Re: Web Farm

Good point. I think we'll have to update the logging to allow for a custom log file name in the web.config. That way, each web server could have it's own distinct log file. We would want that anyway for troubleshooting.

Let's keep this thread going and post all the issues we see, that way, when someone starts to tackle this we'll have a big head start.

1/24/2010 1:29:36 PM
Gravatar
Total Posts 18439

Re: Web Farm

Hi All,

Actually the name of the log file is determined by the log4net.config file in the root, so as long as each node has it's own copy of that file you can make each node use a different log file.

Best,

Joe

1/24/2010 4:22:12 PM
Gravatar
Total Posts 190

Re: Web Farm

That's encouraging. So if two servers have a virtual Data folder to a common shared disk space and each server's log file is given a distinct name in the log4net.config file, are there any other gotchas? Or should this be the workable solution?

Thanks again

1/25/2010 9:07:40 AM
Gravatar
Total Posts 18439

Re: Web Farm

I "think" lucene.net search index uses file locking so it should be ok with 2 servers both trying to write to the index. However, it would be best if only one of the nodes processes the indexing queue or there could be contention or duplication of search index items as each node tries to process the same rows from the indexing queue table.

There is an undocumented config setting that can be used to turn off processing the indexing queue on all but one node. You could add this to the user.config on all but one of the nodes

<add key="IsSearchIndexingNode " value="false" />

All the nodes can write to the indexing queue so whichever node updates content will queue the content for indexing, but only 1 node should process that queue and write to the search index itself.

Other than that, you tell me what issues you encounter, if any.

Best,

Joe

1/26/2010 12:15:09 AM
Gravatar
Total Posts 190

Re: Web Farm

Will do.

You must sign in to post in the forums. This thread is closed to new posts.