Команда nopCommerce расширяется и приглашает на работу первоклассных .NET разработчиков, маркетологов и менеджеров по продажам.

Web Farm Cache

один месяц назад
We have been doing a lot of testing with web farms and have come across a couple issues. I believe I saw the first issue identified in another post but have not noticed any comments regarding the second item.

We have two web farms setup. One is using redis and the other sql server for distributed cache. The issues we are seeing are:

1) Admin Area: After installing a plugin we go to configure the plugin or make other setting changes then click save, the page refreshes but the changes are not being shown on the configuration page. The original values persist. Clearing the redis or sql server distributed cache corrects the issue and saving changes to configuration or settings begin working again.

2) Public Store: We have six servers setup in each web farm. Both the Redis and SQL Server distributed cache product the same issue.  When we add items to the cart the green notification bar up top states the item has been added to the cart but when you go to the cart the item is sometimes not there.  Refreshing the page (ctl-shift-r) reloads the page but the item is not there. Continuing to shop / adding more items then going to the cart will sometimes magically load the item that had not been added before. We are seeing the same type of issue when trying to delete items from the cart. i.e. deleting and item reloads the page but the item will not delete. If we continue shopping and come back to delete the item again it will sometimes delete.

Neither issue happens when using a single instance of NopCommerce without distributed cache.

Any input would be appreciated!
4 недели назад
Looks like web farms are not properly configured. Have you followed instructions described here?
4 недели назад
Yes, we have followed the documentation very carefully at the link provided.

I believe item 1 will be addressed with this work item:

We are setup using Distributed File System Replication (DFSR) for Local Content Infrastructure. Items in the four folders are replicating as expected. All contain the same DataProtection keys.

We have tried switching up the server farm with just two servers vs the six we have setup. We have tried different combinations of  two server web farms. All end up with the issue of items not showing up in the cart when they are added or not being deleted from the cart when the delete x is clicked. Again this isn't always happening but the issue does happen often.

I'm not sure what we may have setup incorrectly but any additional thoughts would be appreciated.
4 недели назад
As we continue looking into this issue we are seeing that when we click add item, the items are ALWAYS added to the ShoppingCartItem table (They just do not always show up in the cart after being added).
When we click delete item on the cart page the items are ALWAYS removed from the ShoppingCartItem table (They just do not disappear from the cart page when deleted).
3 недели назад
It looks like something is not being updated correctly in the distributed cache when an item is added or deleted. The first item is always added correctly then its random after that. Some items add and some do not.

If we wait for the Short term cache to expire and reload the page the items appear. The same thing is happening for deleting items. Once short term cache expires all is good again, items show or disappear as expected. So the questions is what is not right with caching? It could be our setup but we are leaning away from that. As mentioned we have two separate farms setup. One on Redis and the other using SQL Server for distributed cache.  Both have the same issue. Of course the same guy (me) :) setup both web farms following the documentation very carefully!

If we remove all servers but one from the IIS web farm all is working as expected. As soon as we add a second server to either web farm the issue shows up again.

We are using applications in the path or We have changed one of the web farms to no longer use applications however the issue persists (i.e. We also unchecked "SEO friendly URLs with multiple languages" just to make sure the url pathing was not causing any issues.

We have spent hours and hours testing, retesting, reevaluating our setup with web farms. As long as we  wait for short term cache to expire everything refreshes and is working great.  

We need to get to the bottom of this asap so any additional help would be greatly appreciated.
please see the video of what we are seeing below: