The container technology has been at the center of cloud-native development. Utilizing the power of cloud to get your experiments to the market quickly and checking the business viability thereof justifies why containers are an apt choice for hosting applications.
This justification is backed by certain characteristics of containers - quick brought-ins, scaling, dispose-offs, security of processes, and at the same time, ease of creating and destroying. The technology provides us the advantage of achieving consistency in repeated deployments, leading to improved quality in code delivery.
There are various container technology choices available to developers. However, there is an aspect that relates to container types in the case of having a PaaS platform in your environment which is not clearly brought out in the generally published material. Even though this aspect is quite basic and is also guided by the organizational subscriptions, there is a usual problem of choice. Unless there is a fair exposure in dealing with containers, it is difficult to understand the factors to consider. We have ourselves been at the crossroads of using the relevant container type, as the choice considerations were not clear to us in the beginning.
PaaS platforms provide two choices:
Buildpack-based or Platform-built and Developer-built.
Buildpack-containers are part of the PaaS platform that are used to manage the application lifecycle and are designed to run applications that get all their dependencies from buildpacks. Developer-built containers are the containers for which the image needs to be made before it is provisioned as a container.
But what are the considerations while taking a decision of hosting your application between the two choices? If you have the source code, you should consider using buildpack-based. Advantages of buildpack-based are:
- Developers can look for open source runtimes rather than locking with a particular runtime. Developer productivity can improve, as instead of focusing on maintaining images, a simple code push can automatically trigger CI/CD deployments
- Applications can be deployed as source codes
- Platform handles and maintains the middleware and runtime to the latest versions.
Images can be considered when you do not have a source code e.g. with COTS or legacy applications or proprietary runtimes for which buildpacks are not available or are difficult to create. Developer has to take care of identifying middleware, runtime, and dependencies and the developer is responsible to maintain and manage those. We need to also note that PaaS platforms are more opinionated about the developer-built containers.
All this implies that there could be conflicts for developers in terms of the types of access allowed. Having said that, both the choices allow similar isolation of resources through control groups, namespaces, and file system, and hence can be considered equally secure. Both the choices utilize PaaS provided features of security, availability, fail over, log streaming, and auto-scaling while trying to maintain the cloud-native principles.