#Best way to cache a pre-rendered SSG project?

10 messages · Page 1 of 1 (latest)

fierce python
#

Hello! Currently I am working in a project that aims to prerender using data from a Database around 25000 pages

I already got everything working:

  • SEO
  • prerender
  • SSG pipeline build
  • Deploying using Github actions + Aws S3 + Cloudfront
  • i18n

My issue right now is that when I run the build both in local or in github actions I get memory issues, long build time (1 hour +) and it won't be scalable if I add mkre.

My idea right now is to cache the prerendered pages in the project so I can just do the generate and update the specific pages when needed.

But can't figure out any documentation or where to start.

If someone has some suggestions, ideas or a better way to tackle the problem, would be awesome!

PS: I read about ISR with vercel, but I don't want to change my current infrastructure

acoustic ruin
#

25k pages prerendered sound a lot

#

you could use ISR with a running server to avoid memory issues and long buil times

#

⏰ Nuxt 3.10 is out for a few days and brought quite some features! One of them is especially helpful for prerendered, often content-heavy sites. But what is it and how will it reduce our build time? Together we will have a look at the new experimental sharedPrerenderData features, figure out what it is and how it works!

Key points:
🆕 Showcasing...

▶ Play video
minor garden
#

I've had the same issue. We have an ecommerce shop with 12 different languages and a lot of SEO content for each language. I've tried pre-rendering all my SEO pages which is around 40k pages and then my server also runs into memory issues.

Pre-prendering this content would be preferable but for now we settled for SWR with redis

fierce python
#

Thanks @acoustic ruin used that already build time improved, but still issues in build time

For now I limited to 2500 pages, and it finished, but wanna go for 10x

@minor garden will explore SWR too thanks


Really aiming to keep the prerendering...

Wanted to find a way to cache the folder: .output/public so it doesn't rebuild unless a certain trigger is met

But haven't found a way yet

Another thought is to run multiple builds, and upload each build by parts, for example each github action builds pages 1-1000 and I run 25 async jobs...

acoustic ruin
fierce python
#

Trying to optimize costs for now, since it's a hobby project mainly for yugioh cards 🤔 but maybe switching cloud provider could be best

acoustic ruin
fierce python
#

Will look into it, surprised on that 100k requests daily for free!! thank you @acoustic ruin!!