I'm using Magento 2.3.4 open source and I am looking into how I can achieve zero downtime
The build commands I normally use are:
php bin/magento maintenance:enable composer install --no-interaction php bin/magento setup:upgrade php bin/magento deploy:mode:set production --skip-compilation php bin/magento config:set dev/css/merge_css_files 1 php bin/magento config:set dev/css/minify_files 1 php bin/magento setup:di:compile php bin/magento setup:static-content:deploy en_GB en_US php bin/magento indexer:set-mode schedule php bin/magento indexer:reindex php bin/magento cache:clean php bin/magento cache:enable php bin/magento maintenance:disable
This works but requires around 2 - 3 minutes of downtime.
Reading answers like https://magento.stackexchange.com/a/75461/6414 I think it's the best method eg have different releases of files and just swap the symlinks over then do the setup:upgrade which would reduce the downtime to like 30 seconds.
But is there anything better? As that answer is 5 years old