Introduction to Containers
Containers are a way to package software so that it is portable, secure, and isolated from other units of software on the host it resides.
Containers are the heart of the Cycle Platform. They "contain" the base image and all configuration options needed to run them. Running copies of a container are called instances.
Containers on Cycle conform to the OCI spec , so any container that can run on Docker or Kubernetes can run on Cycle without any modification to the base image.
How Containers Work on Cycle
Containers are deployed into environments. The platform will orchestrate containers across servers within the cluster the environment is assigned to, depending on the deployment strategy set in the container's configuration.
The Cycle Platform provides powerful integrated tooling for running containers, especially when compared to alternative container platforms.
- Automated Backups
- Queryable Logs
- Real-Time Instance Console
- Secure Two-Way Console via SSH
- Built-In Auto-Scaling
- Remotely Accessible Volumes
- Functions
and much more.
Configuration Options
Containers on Cycle are highly configurable, allowing deep customization - even up to running containers as "fully privileged".
Network Configuration
A container's network configuration dictates if and how network traffic enters and exits the container.
Runtime Configuration
A container's runtime configuration dictates how the container 'runs', including the commands run on start, the information it has access to, and permissions it has on the host.
Deployment Configuration
A container's deployment configuration dictates how the container is orchestrated, including deployment strategies, startup/shutdown policies, and health checks.
Resource Configuration
A container's resource configuration dictates how much CPU and RAM the container can utilize.
Auto-Scale Configuration
A container's auto-scale configuration dictates how a container scales up and down based on demand.
Stateless vs Stateful Containers
Cycle understands and makes a distinction between stateless stateful and containers.
Stateless Containers
Stateless containers are 'reset' every time they are restarted. They are best suited for ephemeral processes that can be scaled easily, such as web servers or APIs. Most containers are stateless, and should be the preferred way of running containers.
Stateless containers cannot have attached volumes and don't support backups, but can be auto-scaled.
Stateful Containers
Stateful containers are containers that have data that should persist between restarts of the container. These types of containers are required when attaching volumes, and are often used for hosting databases or CDNs/file servers.
Generally, a stateful container will only ever have a single instance (and is recommended by our team). Multi-instance stateful containers are supported, however they tend to lead to complications with configuration. If deploying a sharded or distributed database, for example, it is best to have multiple stateless containers with a single instance, than a single container with multiple instances.
Stateful containers are treated as 'special' by Cycle. They cannot be auto-scaled, but exclusively support volumes and backups.
Deploy Containers on Cycle
Get started right away by deploying containers to Cycle following our interface-specific documentation below.