Monolith in CloudDevOps
We usually read that monolith application is not a good fit for cloud. We hear that Cloud Native application should embrace the microservice architecture. While this is true that it will get the full benefit of it, monolith still benefit of the cloud capabilities.
Micro-Services are difficult. Monolith is easier. If you have no knowledge on Cloud, a monolith could be a good exercise to get started. Learn to walk before learning to run. The downside of this is to get wrong habit. There is Cloud Native design pattern for applications that is not appropriate for monolith.
I'm not saying that you need Kubernetes to get the following capabilities and you cannot do without it but here is some thoughts and gains.
Docker, VM independent #
You can push your code on a Cloud Compute Instance, it won't change from a on-premises, but there is not much gain about this solution. You want avoid friction about upgrading the VM system and headache about missing library. You don't always have a nice configuration tool setup.
Migrate to cloud often mean to migrate to a Docker environment which is reproductible and independent of the Compute Instance. This is not entirely true if you choose the PaaS solution.
Several solutions are available
- PaaS: You write code, push to a repository and everything is taken care for you. You don't have access to environment configuration, meaning that if a specific module is needed in php, you will not get it. You can get a Laravel running.
- Cloud Run: a nice solution that need you to provide a
Dockerfilethat will be handle by the system. The traffic management will be taken care of with good options for release strategy.
- Kubernetes/Docker Swarm: The full solution that might be overkill depending of your need.
In all above solution code logic and state of the application must be separated, this work must be done like you separate front and back in code to get more flexibility. Once this is done you will have flexibility for changing solution without too many worries about your states.
Release strategy #
I will not write about releases strategy with zero downtime. Cloud deployment have this in mind.
- Blue/Green: two different deployments live while allow to switch from one to another.
- Canary: small percentage of traffic send to the new release
- Mirroring: I found this one with Istio, this allow you to send the exact same real request in two deployments at the same time
Scalability, Resiliency #
Two aspects of this, scalability can handle a massive amount of users while automation can reduce cost. You can run more power in day or for special events without any administration maintenance. This led to reduction of cloud cost.
The resiliency is an important concern in modern web application that monolith still benefit. Not based on the logical architecture but with the cloud himself.
Innovation, Accelerate #
With a good continuous integration time to market can be very short and knowing cloud production can bring technology as managed services, without too much administration maintenance, less friction to innovate.
I guess it depends but monolith application can fit in a Cloud Provider environment.