Live data from Hacker News

Incremental Builds in Gatsby Cloud

gatsbyjs.org

61–70 of 81 posts

Re: Incremental Builds in Gatsby Cloud

#61
post #42

Earlier quoted context omitted.

Pick a few random sites from the Gatsby showcase on their homepage and run them through webpagetest.org Simple Testing.

shopflamingo.com, ideo.com, ca.braun.com, and bejamas.io are all blazingly fast for me.

Ideo has a pretty bad insight score (41): https://developers.google.com/speed/pagespeed/insights/?url=...

First paint: 4.1 Seconds. Time to interactive: 11.5 Seconds.

I wouldn't say that's very fast.

Edit: I didn't check the other three.

Re: Incremental Builds in Gatsby Cloud

#62

Earlier quoted context omitted.

Gatsby is a fairly complex static site generator. At the highest level, it provides an ingest layer that can take any data sources (CMS, markdown, json, images, or anything that a plugin supports) and bring them into a single centralized GraphQL data source. Pages (which are built using React) can query this graph for the data they need to render. Gatsby then renders the React pages to static HTML and converts the qu…

But if you have 16,000 of anything, why are you using a static site? Surely the access patterns are long tail and you need to build more often than most pages are even accessed.

Cheaper to build a site and dunp files to a bucket than running Wordpress code on every request.

Re: Incremental Builds in Gatsby Cloud

#63

Earlier quoted context omitted.

But if you have 16,000 of anything, why are you using a static site? Surely the access patterns are long tail and you need to build more often than most pages are even accessed.

Cheaper to build a site and dunp files to a bucket than running Wordpress code on every request.

Surely there's a CPU/disk trade off at some point. Static pages are much larger (less likely in memory) and would cause disk reads much sooner than the same files being generated dynamically. Of course wordpress isn't known for it's efficiency so the static page preference is probably quite high.

Re: Incremental Builds in Gatsby Cloud

#64

Earlier quoted context omitted.

Gatsby is a fairly complex static site generator. At the highest level, it provides an ingest layer that can take any data sources (CMS, markdown, json, images, or anything that a plugin supports) and bring them into a single centralized GraphQL data source. Pages (which are built using React) can query this graph for the data they need to render. Gatsby then renders the React pages to static HTML and converts the qu…

But if you have 16,000 of anything, why are you using a static site? Surely the access patterns are long tail and you need to build more often than most pages are even accessed.

Admittedly in this case I'm mostly just trying to push Gatsby to it's limits. For a photography site, there ends up being very little overhead with a static site (if you can do incremental builds). I also explored NextJS (SSR) and just making a good old SPA, but decided to go with Gatsby because at the end of the day, a distinct majority of the storage cost is just the raw images. I think Gatsby ends up making the most sense because you get to take advantage of a CDn for caching (most don't like being used just as an asset cache) and I can just leave it there without worrying about a server.

Re: Incremental Builds in Gatsby Cloud

#65

How much is the speed issue related to the language used? I know Hugo is an order of magnitude faster than most static site generators for example - it's written in Go with e.g. 2 seconds to generate about 10K pages https://forestry.io/blog/hugo-vs-jekyll-benchmark/ . I would have thought the generation process could be massively parallelised and a typical blog page would only need a modest amount of computation e.g.…

I don’t think it’s a language issue. Even for JavaScript bundlers you have the slow extensible bundle and the “new super fast bundler” that dies in a month because it only fits one use case. How flexible is Hugo? And how many plugins does someone generally use?

I use Hugo to run a site for a small news organization. It’s flexible enough. I’ve never run into something I couldn’t make it do with some creative thinking. It doesn’t have any plugins because why would it need a plugin? I guess there is a basic build and an extended build for including image resizing, but they would only have one build if they didn’t need to use C for the image stuff. Plugins mean the system doesn’t solve the problems of its users…

It does have themes, but I just write my own.

Re: Incremental Builds in Gatsby Cloud

#66

Earlier quoted context omitted.

Server-side rendering (like Wordpress) generates HTML in response to a URL. Static site generators just visit every possible URL at build time and save the final HTML as files. This makes it easy to deploy and scale when your site is static and doesn't need any features of dynamic server-side rendering. Gatsby (and other frameworks) automate this process by going through whatever data sources you have (directory of m…

Wordpress in particular is not “just fine”. During this crisis, every government site based on WordPress ends up crashing under the load. Yes, you can avoid this with a good cache plugin and a CDN. But you can also avoid it by using a tool that is designed to not crash under load in he first place.

And then you can regenerate all your files every time you make a change - the trade off isnt worth it for one off sites that generally sit at zero traffic.

Cheaping out on things that need actual support wont be fixed by making it a static html page.

Re: Incremental Builds in Gatsby Cloud

#67
post #63

Earlier quoted context omitted.

Cheaper to build a site and dunp files to a bucket than running Wordpress code on every request.

Surely there's a CPU/disk trade off at some point. Static pages are much larger (less likely in memory) and would cause disk reads much sooner than the same files being generated dynamically. Of course wordpress isn't known for it's efficiency so the static page preference is probably quite high.

there is a big difference in the cost of static hosting and CDN (think Cloudfront / S3) for static stuff and running an active piece of hardware for static stuff that doesn't change. Like orders of magnitude. Sure for small sites it's not that much but it's still orders of magnitude.

also the answer to a large number of my interview questions ends up being figuring out how you can just effeciently serve the stuff from a CDN/Blob Storage. You can scale the crap out of this for quite cheap.

Re: Incremental Builds in Gatsby Cloud

#68

Earlier quoted context omitted.

Server-side rendering (like Wordpress) generates HTML in response to a URL. Static site generators just visit every possible URL at build time and save the final HTML as files. This makes it easy to deploy and scale when your site is static and doesn't need any features of dynamic server-side rendering. Gatsby (and other frameworks) automate this process by going through whatever data sources you have (directory of m…

Wordpress in particular is not “just fine”. During this crisis, every government site based on WordPress ends up crashing under the load. Yes, you can avoid this with a good cache plugin and a CDN. But you can also avoid it by using a tool that is designed to not crash under load in he first place.

Serving up a HTML file from disk or generating some dynamic HTML are both trivial to do once. After that, a CDN layer is used to cache the HTTP response, regardless of how it was generated.

Sure if you just want to serve HTML files on every request with a simple file server than static files will be faster, but it'll eventually get overloaded too. The CDN is where the real scaling happens. And using a CDN is far easier than changing the entire backend to a static site.

Also most of the sites that crashed were dynamic applications, not just static pages. Using a static site generator wouldn't solve that problem.

Re: Incremental Builds in Gatsby Cloud

#69

so this is cool release, and no objection on that but if your pipeline has automated testing, security scans and more then you are not actually deploying in 10s more technical details would be good but I guess either I missed it or they look at it as IP

You wouldn't be running automated testing etc on data updates though, surely? That's what this feature is for, not code updates.

Re: Incremental Builds in Gatsby Cloud

#70
post #11

Gatsby founder here. Really appreciate the feedback and support for our launch today! The team worked super hard to get Incremental Builds live in public beta but are taking all the feedback (here and all over the web) as we go into full launch. Let us know what you think. Thanks!

Kyle, Just read the post, congrats on the launch! We've been using Gatsby on: https://mintdata.com for the past few years, and are huge fans of your work. I still recall the day when I brought Gatsby into our org, our front-end guys almost ate me alive :D They said: a React.render(...) + GraphQL thing, why do we need it? What's the big deal? Fast forward a few years later, and Gatsby dominates (in my opinion) the bes…

Wow MintData looks so cool! I was just trying to figure out whether Webflow can be used to build simple apps, then I saw this, a whole new level. Is there a way to try it?
Post reply on HN