Web Farm Url Rewrite

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
We are trying to complete a webfarm setup and are having a problem with the rewrite rule for the lib_npm directory.  The rule is in place and the admin redirect is working. However we are getting the following errors for the .min.js files in the lib_npm directory.

Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.min.js:1
Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.validate.min.js:1
ect...

<rule name="Admin Area" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
  <match url="^(admin(/.*)?)$|^(lib_npm/.+)$" />
  <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
    <add input="{HTTP_HOST}" pattern="^admin.mydomain.com$" negate="true" />
  </conditions>
  <action type="Rewrite" url="http://admin.mydomain.com/{R:0}" />
</rule>

The debugger shows the files are still being grabbed at mydomain.com not admin.domain.com the primary instance.

Any help would be appreciated.
2 years ago
Have you defined conditions in the second rule to prevent request processing for this folder?

   <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{PATH_INFO}" pattern="^(/admin(/.*)?)$|^(/lib_npm/.+)$" negate="true" />
    </conditions>
2 years ago
Thank you. Yes we do have this in place. Of course I could have something wrong.

        <rule name="ARR_Nop-Server-Farm_loadbalance" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
          <match url=".*" ignoreCase="false" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
            <add input="{PATH_INFO}" pattern="^(/admin(/.*)?)$|^(/lib_npm/.+)$" negate="true" />
          </conditions>
          <action type="Rewrite" url="http://Nop-Server-Farm/{R:0}" />
        </rule>
2 years ago
Dear,
I also have the same requirements, can u please share how did u implement loadbalance.


Regards
2 years ago
For our implementation we followed the documentation located at: https://docs.nopcommerce.com/en/installation-and-upgrading/installing-nopcommerce/web-farms.html

We have setup a Replication server using DFSR and are using Local Content Infrastructure method.

We are using Redis for distributed caching. We setup our own Redis server in house. We have also setup SQL server for distributed caching but Redis was faster in a couple quick tests.

Following the documentation Routing is working as expected. For Testing we put the ip address on each server in the header to verify which server we are getting to. As we reload a page we can see the request being served by each of the servers in the web farm.

We have not yet been successful in getting the web farm working correctly. There appears to be be a couple issues with distributed caching.  Items are being addressed in version 4.50 (https://github.com/nopSolutions/nopCommerce/issues/5593) which we hope will address our issues.  

We have not been able to solve the issue of once a second item is added to the users cart, it does not show in their cart until the short term cache expires. Once the cache expires the item appears in their cart when the page is refreshed.

Are you having a specific issue?
2 years ago
brandon71 wrote:
For our implementation we followed the documentation located at: https://docs.nopcommerce.com/en/installation-and-upgrading/installing-nopcommerce/web-farms.html

We have setup a Replication server using DFSR and are using Local Content Infrastructure method.

We are using Redis for distributed caching. We setup our own Redis server in house. We have also setup SQL server for distributed caching but Redis was faster in a couple quick tests.

Following the documentation Routing is working as expected. For Testing we put the ip address on each server in the header to verify which server we are getting to. As we reload a page we can see the request being served by each of the servers in the web farm.

We have not yet been successful in getting the web farm working correctly. There appears to be be a couple issues with distributed caching.  Items are being addressed in version 4.50 (https://github.com/nopSolutions/nopCommerce/issues/5593) which we hope will address our issues.  

We have not been able to solve the issue of once a second item is added to the users cart, it does not show in their cart until the short term cache expires. Once the cache expires the item appears in their cart when the page is refreshed.

Are you having a specific issue?


Did you tried the refactored ClearAsync method of the https://github.com/nopSolutions/nopCommerce/issues/5593
issue.
2 years ago
Thank you for your response. I have shared the link with our dev team and hopefully this will be a solution for now.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.