Can't get load balancing to work

Posted by Community Admin on 04-Aug-2018 10:36

Can't get load balancing to work

All Replies

Posted by Community Admin on 07-Dec-2011 00:00

Hi,

To sum things up:
- Our Sitefinity site runs on 6 production servers
- Under Settings (Advanced) / LoadBalancing / WebServerUrls, we put the IP of each server
- If we modify the site configuration through the back office (a change that modifies config files), the change is only done on the current server, not on the other servers (for example: disabling a widget from the toolbox)

Are we doing something wrong?

Thanks.

Posted by Community Admin on 07-Dec-2011 00:00

Just adding to your thread, as we are facing a similar problem.

What is happening behind the scenes where we have more than two production servers? As I understand, Sitefinity passes context from one server to another to make sure that Server1 is aware of what Server2 is doing. In a scenario where there are 6 servers, is Sitefinity doing exactly the same thing? Is it copying single context from 1 server to another 5? Surely this has a massive affect on performance of the site?

Also, do you plan on supporting custom cache prodivers in 4.4 or 4.5? This is something that we are familiar with and would prefer to use over Sitefinity load balancer (for now anyway)

Posted by Community Admin on 07-Dec-2011 00:00

This might help you out. Are you storing your configuration in database? If not, you can update your web.config to move all configuration data (apart from connection string) to the database. It makes sense to do this in load balanced environment.

I had to configure this for our development environment, as we have multiple developers working against the same database.

Posted by Community Admin on 07-Dec-2011 00:00

"This might help you out. Are you storing your configuration in database? If not, you can update your web.config to move all configuration data (apart from connection string) to the database. It makes sense to do this in load balanced environment."

Ah, I did not know this was possible. After having discussed the problem of config files with Telerik admins, they never brought up this solution.

By the way, even if load balancing worked, I think we're in a sticky situation. Our site, which is an intranet site, can be accessed through an URL alias (such as http://mysite/). This brings issues, as it breaks the publication workflow for some reason (while it works if we use a different URL that specifically targets a certain server). We managed to fix this issue by specifying, under Settings (advanced) / System / ServicePaths, the WorkflowBaseUrl value. This value must be different for each server (to specifically target each server). This means that if the configuration was properly synchronized across our 6 servers, we could no longer have unique WorkflowBaseUrl values for each server (unless we never updated that setting again, I guess). Sorry if it's confusing, but it's a relatively complex problem.

I'm not sure what's the best way to handle this.

Posted by Community Admin on 12-Dec-2011 00:00

Hi,

I am sorry about the caused inconvenience. I see that you have found a solution, but the easiest way is to sync all servers configs is to manually copy the configs from one node to another or you can try Victor's solution as well.

I will also forward your recommendations and concerns to the respective teams, so they can discuss your situation.

All the best,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 12-Dec-2011 00:00

Hi Victor,

"the easiest way is to sync all servers configs is to manually copy the configs from one node to another"

We do not have the rights to do this in production. We work in a big company, with several teams, each within a specific domain. On the technical side, there's one development team (ours), one DB team, and one infrastructure / deployment team. Only the latter has write access on the servers.

Posted by Community Admin on 12-Dec-2011 00:00

Thank you, It would be great if this gets address within next few releases as I believei it's a very common requirement for enterprise.

Posted by Community Admin on 12-Dec-2011 00:00

Hello Thomas,

Please have a look at my colleague's blog post, regarding Victor's suggestion:

http://www.sitefinity.com/blogs/radoslavgeorgiev/posts/11-10-24/moving_configurations_to_database.aspx

Regards,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 12-Dec-2011 00:00

Victor,

Thanks for the link, I'll check it out.

Anyway, could you explain what load balancing does in Sitefinity, as of now, exactly?
I specified the IP of each server in the load balancing configuration. What does this do, actually? Nothing?

Thanks.

Posted by Community Admin on 12-Dec-2011 00:00

By the way, we realized the problem is more serious than anticipated.
If we create a new page (or update one) on one server, this page (or its update) does not appear on other servers (as the cache is not updated). It only appears after the site has been restarted on the concerned servers.

Is this not supposed to work? What can we do?
This is blocking for us.

Posted by Community Admin on 12-Dec-2011 00:00

Thomas, we have set caching to use database by going to settings -> advanced -> cache managers. We set the CacheStory property to SharedBackingStore

We have also disabled OpenAccess ORM caching by going to system -> advanced -> data and setting the Enable Data Caching property to false.

This might resolve issues that you are having. We will re-enable these features once we configure our load balancing environment.

To elaborate on this, I think what is happening is that OpenAccess has some kind of context for "talking" to the database. Obivously database access context can't be cached in the database, as it doesn't make sense, same as you can't connect to the database if connection string is stored in the database. This context is available to the worked process on Server1, but it's not available to the worker process on Server2.

Posted by Community Admin on 15-Dec-2011 00:00

Hi,

1) If you make configuration changes on one server and each of your servers has its own copy of the website files, the changes will be seen only on the server you make the changes. This is why it is recommended that for NLB solutions to set the storing of configuration files to database.

2) When you define the webserver paths for each node in the NLB environment, make sure that that the nodes can communicate between each other and that the MSMQ messages to the respective nodes are not blocked by a firewall. The addresses of the nodes are needed to make sure that each server has the latest version of your items cached. So for example when you edit and publish a page the server that you made the change on messages the rest of the servers over MSMQ to invalidate the cache dependency for this page, and make sure that when the page is requested on a node in the NLB the proper version of the page is returned. If you edit a page on one server and the the page is not updated on the rest of the servers, after you have configured NLB settings, this means that either the configuration is not applied on all servers, or something is preventing the servers from communicating with each other.

3) The second level cache of the ORM does not work under NLB. For this reason we automatically disable it when you configure the website to run under NLB.


All the best,
Radoslav Georgiev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 15-Dec-2011 00:00

Hi Radoslav,

Is there any plans for supporting custom cache providers (such as AppFabric) in near future?

Thank you,

Viktor

Posted by Community Admin on 15-Dec-2011 00:00

Hi Viktor,

We have tentative plans for this, however this support is not on our immediate Roadmap. Once we add this to the plan it will be reflected on the road map.

One more remark. Sitefinity always uses the memory output cache of the server, there is not database caching providers.

Greetings,
Radoslav Georgiev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 02-Feb-2013 00:00

Hi All,

Wondering if  anyone got a solution on this? We are also facing similar issues with load balancing setup of Sitefinity. In our case while editing a page request goes to different server and it throws Page not Found error message. 

I would apprciate if you anyone can suggest teh best possible way to deal with such behaviour of sitefinity.

Thanks,

Chetan


Posted by Community Admin on 06-Feb-2013 00:00

Hi Chetan,

The "Page not found" error should be caused by misconfiguration of sitefintiy for load balancing.
Referring to the load balancing setup guide make sure the different servers in the NLB setup can ping each other so the load balancing service can transfer a page from one server to the other.

To make sure the load balancing have been setup correctly test to create a page on one of the servers and login to the other server, if you see the page created on the other server load balancing is working.

Kind regards,
Stanislav Velikov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 08-Aug-2013 00:00

I'm also curious as to whether or not the second level cache for the OpenAccess ORM can somehow work with Load Balancing enabled?  We're hoping to use that to for a significant performance boost.

Posted by Community Admin on 13-Aug-2013 00:00

Hi,

The setting for enabling data caching can be enabled, but it will ruin the load balancing setup because in NLB there are at least two servers accessing a single database and each server have to always get the latest updates made to the database not a cached query that the second level cache is providing.
If the setting is enabled in NLB once a user logged using one of the servers in NLB creates a page this page will be visible on the server that served the page creation request, but not on other servers in NLB scenario because the other servers will use the cached result for pages saved by the second level cache and will not be aware there are newly created pages.

Regards,
Stanislav Velikov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed