This approach is more focused on DevOps, but the solution involves having two separate apps (or containers):
-
- The existing production app, which is fully functional
-
- The newly deployed app currently in the building process
Once the build for the 2.
app is complete, simply swap it with the 1.
app using a method called rollout
, ensuring that users will access the new app upon refresh or visit (with single-page applications requiring updates).
You can also implement configurations for a progressive rollout strategy, such as:
Introducing the new codebase to 20% of users while keeping 80% on the old version, gradually increasing the percentage as you verify stability before full rollout
Typically, JAMstack PaaS platforms like Netlify and Vercel automate this process for you.