Next.js Discord

Discord Forum


Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
Background context: When we first did our headless website and moved from Shopify -> Next, we went in with ISR from the beginning, however we quickly came across stale content on our lesser used pages... This is mostly due to ISR serving stale pages, and revalidating after the fact... Combined with each K8s pod at the time having it's own page cache in memory, we decided at the time to move everything to SSR... Obviously that has more server requirements and slower in general.

So... Visiting ISR again now we're running on open-next, how would you guys revalidate product pages for example... Simple answer is "Webhook" right? But we have over 3m product updates (Stock levels, prices etc) every day, across 14 different domains, so the revalidation requirements alone are insane, the revalidation lambda would just be constantly running... Let alone, then we'd have to revalidate the collection pages that product belongs to every time there's certain updates like price 👀

Initial thought would just be update all product pages on a cron job but... We might as well just stick with SSR at that point and generate them on demand, and rely on cache for frequent pages? 🤔

0 Replies