What’s a build?
Build refers to the process of compiling your site. During a build, or at build time, your project gets transformed from component files to optimized HTML, CSS, and JavaScript files that you can deploy to your hosting provider.
Build Concurrency:
Each workspace has a limit on the number of builds that can be run at the same time. Concurrent builds count across sites and not on the same site because Gatsby builds sequentially. A development and production site can be building at the same time but the main branch of either only ever has one build ongoing at a time(although others can be queued). For a free plan, the limit is set to 1. For a professional plan, the limit is 3 builds with the ability to add up to 10.
Build Priority:
So how are multiple builds prioritized?
- All the builds for your workspace are pooled together.
- All builds for a specific site are further grouped.
- Production builds are prioritized over pull request builds.
Build Queue:
Builds follow a queue process while they run. The number of queues corresponds to the number of concurrent builds your plan has.
- Each queue only has a capacity of processing one build at a time.
- Once a build is ready to be processed it goes through an initialization process.
- During the initialization process, the status is set to queued.
- Once the initialization process is complete - The build status changes to In Progress.
- Once the build is complete, the queue will start processing the next build on the queue.
- This process continues until the concurrency limit is hit.
Example:
John has a free workspace that has 3 sites. As a free workspace he has a concurrency limit of 1. Let’s go over a couple of scenarios:
- John triggers one build:
Gatsby cloud will process this build immediately.John triggers a build on Site1 and build is also triggered on Site2:
-
-
Gatsby cloud will process Site1 build immediately.
-
Site2 build will wait for the build queue to clear up.
-
Once Site1 build is completed, Gatsby will start processing Site2.
-
John triggers Site1 build, then Site2 build is triggered via pull request. Finally, a Site3 build is triggered and it is a production build.
-
-
Gatsby cloud will process Site1 build immediately.
- Site2 build and Site3 build will wait for the build queue to clear up. Please see Build Priority.
- Because Site3 is a production build, Site3 will be built as soon as Site1 build is complete.
- Site2 build will wait until Site3 build is completed.
-
Comments
0 comments
Please sign in to leave a comment.