3

I am using nopcommerce 3.6 and here is problem with load balancing.

I have 3 machines to handling traffics and I using source ip hashing method.

Now, I want to switch from this method to round-robin method cause it's better to handle traffics but in nop 3.6, guest users cart items set by cookies and if a guest forward to another servers the cart items will remove.

For example :
A Guest A comes to site in server X and adds an item to cart. by clicking to ADD_TO_CART btn, the page will refresh and guest may forward to server Y cause the round-robin method thinks that server Y has lower traffic than server X.

Cause guest item added to cart in server X,and now he/she is in server Y, the cart will lost.

How can I manage cart and sessions here? Any solutions?

Ralf Bönning
  • 14,515
  • 5
  • 49
  • 67

2 Answers2

2

i solved my problem by adding same machinekey for each applications in servers so round robin is working now

0

That means Nopcommerce is not designed for a web farm, it should be storing state externally. You can use Session Affinity as linked in the comment to kind of fix the issue, but you might still face it if one instance of your app goes down for any reason.

juunas
  • 54,244
  • 13
  • 113
  • 149
  • nopcommerce save guests information with GUID + shopping cart items in DB and my DB is share between all servers. – Amir Ziyaee Oct 25 '16 at 05:55