Making nopCommerce faster and scalable with improved caching

1 yıl önce
New article how we drastically improved the Redis distributed cache performance. It's actually faster than the current memory cache.

https://www.majako.net/making-nopcommerce-faster-and-scalable-with-improved-caching-familywallpapers

Our changes to the caching strategy can broadly be summarised in three points:

- a new distributed cache option RedisSynchronizedMemory, a regular fast memory cache that uses Redis events to keep instances in sync,
- lazily acquiring data on cache misses to avoid duplicating work, and
- storing large collections in specialised data structures for faster retrieval.

For FamilyWallpapers, these combined improvements resulted in a decrease of, on average,

98 % of startup time,
71 % of maximum memory usage, and
96 % of response times

on a benchmark battery compared to using the distributed cache included in nopCommerce 4.60.

Compared to the old memory cache, we observed a reduction of

86 % of startup time and
27 % of maximum memory usage.

Lower and more predictable memory usage allows us to host the site on a cheaper server without risking performance dips or downtime, while faster startup and warmup lets us quickly scale to meet increased traffic during peak hours. Faster response times, of course, are crucial to a smooth user experience for the customers.

Read the full article https://www.majako.net/making-nopcommerce-faster-and-scalable-with-improved-caching-familywallpapers
1 yıl önce
Good job! And thanks a lot again for your pull requests with contribution to the core!
1 yıl önce
Hi everyone,
this change will go into 4.70 version of nopcommerce? We have exactly the same problem of familywallpapers; with the 4.60 version, nop take about 20/30sec to startup.

Thanks.
1 yıl önce
STESAMO wrote:
Hi everyone,
this change will go into 4.70 version of nopcommerce? We have exactly the same problem of familywallpapers; with the 4.60 version, nop take about 20/30sec to startup.

Thanks.


The changes are fully compatible with 4.60, so we can help you merge them into your current code base already now. Just send us an e-mail at [email protected] or a private message here.
8 ay önce
Majako wrote:
Hi everyone,
this change will go into 4.70 version of nopcommerce? We have exactly the same problem of familywallpapers; with the 4.60 version, nop take about 20/30sec to startup.

Thanks.

The changes are fully compatible with 4.60, so we can help you merge them into your current code base already now. Just send us an e-mail at [email protected] or a private message here.


Hi,

Is there a way to migrate this to 4.50?
8 ay önce
ahmadkq wrote:
Hi everyone,
this change will go into 4.70 version of nopcommerce? We have exactly the same problem of familywallpapers; with the 4.60 version, nop take about 20/30sec to startup.

Thanks.

The changes are fully compatible with 4.60, so we can help you merge them into your current code base already now. Just send us an e-mail at [email protected] or a private message here.

Hi,

Is there a way to migrate this to 4.50?


Hi,

Yes, we are currently running it on 4.50 for one client. It is fairly straightforward to migrate, but the whole caching code has been refactored on top of this rewrite, so there are many classes that need to be copied.

We would be happy to help under a regular consultant contract, but if you want to do it yourself we'd recommend starting by copying RedisSynchronizedMemoryCache.cs from the latest development code, and including all its dependencies and files where it's referenced, until the code builds. Alternatively, it might be easier to upgrade to 4.60 before doing the same thing.

Best regards,
Majako