Right-Click → View Page Source

How the Netlify Build Queue Works

I’m using Netlify in conjunction with Contentful and have configured a Contentful Outgoing Webhook to trigger a Netlify Build Hook when content is updated. This got me wondering whether or not Netlify operates a build queue and, if so, how it works.

There is (at the time of writing) no formal documentation on this topic, so I hopped onto the Netlify Gitter conversation to see what I could find out. Thankfully Mathias Biilmann (the founder of Netlify, no less) was on hand to enlighten me.

It turns out they does use a build queue and this is how it operates:

We’ll start the first one, and then once that’s done, our system will mark all the intermediary builds as “Skipped” and then run the last one

Thankfully this is the logic that I was hoping for 🎉

In the case of the Contentful Content Preview API, the webhooks can be triggered fairly frequently (up to 3 times a minute) whilst content is being edited. My worry was that this was creating a race condition that could result in stale content winning out over fresh content. Thankfully these worries were unfounded.

💬

Join the converstation on the DEV Community or send a Webmention

About the author

A profile photo of Saul Hardman

Hiya, I'm Saul Hardman, a front-end engineer based in Copenhagen, Denmark. I'm currently available for work, so if you need help building websites, web applications, and everything in between get in touch!

To stay up to date, follow me on Twitter and GitHub and be sure to subscribe to the RSS feed.

Related Articles