Though most of the development tasks are done via developer mode, you have to switch Magento to production mode to ensure secure and fast environment.
Correspondingly to offer an exceptional customer experience you have to switch to production.
The only thing is, as during any static content deployment or DI compile your website will be down.
So to switch to production mode in Magento 2 with no downtime, you have to use the following command:
bin/magento magefan:zero-downtime:deploy-mode-set --mode production
It is part of the series of zero downtime deployment commands that enable you to customize Magento with no interruptions to customer experience.
All changes are deployed in the background, the same as switching Magento modes.
And the process is reversive. So if you need to switch back to developer or default, just use the following commands:
bin/magento magefan:zero-downtime:deploy-mode-set --mode developer
bin/magento magefan:zero-downtime:deploy-mode-set --mode default