NuCache and very large Enterprise-level websites #13734
Replies: 3 comments 2 replies
-
Hi @LennardF1989. Thanks for your input. We are aware this is a big concern, but at the same time a fix for this requires a rewrite of one of the most complex parts of Umbraco. So there are no low hanging fruits. Currently we consider the EOL of AngularJS more important and that's why we mainly focus on replacing this with most of our people. As soon as this is done, we plan to look into "Support for Lazy-loaded Content Cache in Umbraco CMS". |
Beta Was this translation helpful? Give feedback.
-
I've been closely following the discussion about caching in Umbraco for sites with a large amount of content, and I'd like to highlight a critical point. When dealing with sites that have hundreds of thousands of pieces of content (for example, a multi-site setup with 20 portals, each holding around 50,000 items, amounting to 1 million pieces of content), a traditional caching strategy can quickly lead to significant resource consumption. Key Issues: Fragmented or selective caching: By caching content in fragments (e.g., by section or portal), we can optimize memory usage and prevent the entire site’s content from being cached at once. This could be particularly useful in multi-site setups. Distributed caching: For very large installations, a distributed caching solution (such as Redis or Memcached) could help spread the load across multiple servers, avoiding the need to store everything in the local memory of each node. External caching providers: Utilizing external caching providers and customizing caching strategies based on site-specific needs (e.g., frequency of content updates, traffic patterns) could further improve performance without overwhelming server resources. Comparison to WordPress: In summary, for large-scale sites, moving towards a more dynamic, lazy-loaded, and distributed caching approach is a necessary evolution to ensure both performance and scalability. I'm interested to see how Umbraco will evolve in this area! |
Beta Was this translation helpful? Give feedback.
-
Optimizing Memory Management in Umbraco 12.x (dotnet 7) for Large-Scale News Content with Custom Archiving and Caching When managing a large-scale news website with thousands or even millions of articles, the default caching behavior in Umbraco can lead to memory pressure, especially with older articles. By default, Umbraco caches all content in memory, which is efficient for smaller websites but can cause issues for large-scale content repositories like news portals. For instance, in an online news site, daily articles quickly accumulate, leading to a huge content library. Keeping all of these articles in memory can slow down performance and increase memory usage. Solution Overview: We will leverage Umbraco’s IContentFinder to intercept requests for /art/{slug} (for example, /art/natale-oggi) and decide whether to serve content from Umbraco or from an archived database table using IAppPolicyCache. Supported Versions: Implementation for Umbraco 12.x (dotnet 7)
2. Custom Controller for Archived Articles with IAppPolicyCache
Explanation: Example using NPoco (for Umbraco 9.x/10.x/11.x): Controller using NPoco:
Key Differences for Umbraco 9.x/10.x/11.x: Conclusion This strategy is especially useful for large-scale content sites like online news portals, where content grows rapidly over time. This example provides a simple starting point, and we will continue to offer additional code snippets to expand the solution. For instance, we will provide examples on how to manage archived news in the backoffice, code for moving news from active content to an archive, and how to handle URLs for active content while considering archived URLs to avoid collisions or URL navigation issues. |
Beta Was this translation helpful? Give feedback.
-
As explained here: #13525 and acknowledged on the Roadmap under "Support for Lazy-loaded Content Cache in Umbraco CMS", the current solution for NuCache does not work for very large (Enterprise-level) websites.
One of our clients is pushing Umbraco (v8, for the record) to its absolute limit in terms of size. As described above, at December 5th 2022, we had about 21480 content nodes (each with over 5 variants) and 166193 media nodes. Today, we're already doubling that and rebuilding NuCache went into the 1,5 hour.
We added all kinds of precautions like automated backup- and restore flows on rebuild and site startup, to prevent Umbraco from ever having a reason to rebuild the ContentStores on startup. With our client launching a third website soon, this number of nodes is only going to grow even further.
We anticipate that an upgrade to Umbraco v11 is only going to extend the lifetime of the NuCache solution by a little, but it's a problem that will just keep growing more and more unmaintainable.
With Umbraco pushing for more Enterprise solutions, I feel this is one of the things that should be tackled rather sooner than "Later", as it's a serious problem for any large site. Knowing all this, I'm very hesistant to for example convert large-scale Optimizely solutions to Umbraco, while functionality-wise, Umbraco is totally ready for that.
This discussion aims to see who else is dealing with similar issues, remedies taken, and to just raise awareness that this issue is making us and Umbraco look bad for this particular client and also halts us from even suggesting Umbraco for large websites with a similar amount of expected nodes.
Beta Was this translation helpful? Give feedback.
All reactions