Make the artisan down command work on multiple servers #36474
-
This was proposed here. The problem: when you have multiple Kubernetes pods (or multiple application servers), the down command will only write the file on one disk, but if the application is served from another pod or server, it will be running normally. The option to write the data on redis or database will solve this problem. Here is one example overriding the application to get this working https://www.raypold.com/posts/laravel-distributed-maintenance-mode/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I've created a pull request regarding this discussion #40059. It should resolve the possibility to easily replace the maintenance mode logic. The only point it doesn't address is the maintenance.php file which could be placed under storage/framework directory. I don't known how much it is used but requires some special attention for it can be called before Laravel is initialised. |
Beta Was this translation helpful? Give feedback.
I've created a pull request regarding this discussion #40059. It should resolve the possibility to easily replace the maintenance mode logic.
The only point it doesn't address is the maintenance.php file which could be placed under storage/framework directory. I don't known how much it is used but requires some special attention for it can be called before Laravel is initialised.