Multiple Containers in One Pod
Last updated: 2020-02-25 11:17:52PDF
Practice: One Instance with Multiple Containers
Advantages of Using One Instance with Multiple Containers
Resource sharing and communication The existence of instances makes it more convenient for containers under the same instance to share data and communicate with each other. Containers under the same instance use the same network namespace, IP address and port range, and can discover and communicate with each other through localhost. In a hierarchical shared network, each instance has an IP address to communicate with other physical hosts and containers, and the instance name is used as the hostname when the container communicates. Containers running in the same instance also share a storage volume space. The data in the storage volume will not be lost after the container restart, and can be read by other containers under the same instance.
Manage Compared with native's container interface, the instance simplifies the deployment and management of the application by providing a higher level of abstraction. An instance is like a unit of management and horizontal deployment and management, and hosting, resource sharing, coordinated replication, and dependency management can all be handled automatically.
Common Application Scenarios for Single Instance with Multiple Containers
Instance can be used to construct vertically-integrated application stack. However, its main purpose is to manage certain supportive programs in a centralized manner, such as:
- Content management, processes for loading files and data, processes for managing local cache, etc.
- Log compression, rotation, backup, snapshot, etc.
- Data change listening, log and monitor adapters, event distribution, etc.
- Proxies, network bridges, adapters and so on
- Program control, management, configuration, upgrade and so on
More can be viewed Instance application scenario