Knowledgebase

Minimising Downtime During a Release Print

  • devopsinfrastructure, devops, downtime, database, uploads, caching, guide, howto
  • 0

Minimising interruption.

WHAT CAUSES DOWNTIME

Files being replaced while requests arrive Database changes incompatible with running code Caches rebuilding Workers restarting

WHAT REDUCES IT

Preparing the new version completely, then switching to it Keeping the previous version available

HOW THAT WORKS

Deploy to a new directory Prepare it fully Switch a link to point at it Keep previous versions for reverting

WHY THAT HELPS

The switch is instantaneous, and reverting is another switch.

WHAT TO BE CAREFUL WITH

Shared directories: uploads, logs, configuration.

Those must persist across versions rather than being replaced.

WHAT TO LINK RATHER THAN COPY

Uploaded files Environment configuration

WHAT REQUIRES MORE CARE

Database changes.

WHY

The old and new code may both run briefly.

WHAT TO DO ABOUT IT

Make schema changes compatible with both versions.

Add columns before using them. Remove them in a later release.

WHAT TO ACCEPT

For a small application, brief maintenance downtime is frequently acceptable.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot