3 ms·
Deferred static generation is the tradeoff they've arrived at where quick builds and full static site generation are at odds for large sites powered by an API-f
by tedmiston 4y ago
Deferred static generation is the tradeoff they've arrived at where quick builds and full static site generation are at odds for large sites powered by an API-first CMS.
There's also a cache feature in Gatsby that might be able to help reduce the 5 minute build time.
https://www.gatsbyjs.com/docs/build-caching/ https://www.gatsbyjs.com/docs/build-caching/
- aosaigh 4y agoBut why go with a static site in the first place if the benefits are so compromised at scale?
- bigiain 4y agoThere are huge _read_ benefits, especially at scale. They traded that off against write performance - which means it's an awful idea for Twitter, but write performance isn't exactly a problem for someone who only write a blogpost or two a week. In my opinion, most Wordpress sites (specifically ones that are not updated multiple times a day) should be generated static sites. They can them be hoisted on S3 with CloudFront/CloudFlare in front of them, and never ever need to worry about scale or security. You can't SQLi or XSS a website that's just static html. It's practically un-DDOSable too.
- tedmiston 4y agoI think one short answer is that many static sites aren't "at scale" when they start and probably will never get there. But if they do, this feature is sort of insurance. I'm a backend dev / DevOps engineer, so you might get a different take from someone who works in frontend daily.