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 Incoming Webhook 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

Saul Hardman is a contract front-end web developer based in Copenhagen, Denmark. During his career he's worked with the likes of The Guardian, UNIT9, and AllofUs. As of now he's helping Realla with front-end architecture, performance, and technical SEO.

To stay up to date, follow Saul on Twitter and GitHub or subscribe to the RSS feed.