DEV Community

Sky Lee
Sky Lee

Posted on

Multiple applications in multiple containers vs Multiple applications in single container

As a beginner in Docker or container, people always ask why I can't put all the application in a single container and deploy it to anywhere?
Well, technically you can but here are some considerations.

Multiple Applications in Multiple Containers Multiple Applications in a Single Container
Isolation Each application runs in its own environment All applications share the same environment
Scaling Different parts of an application can be scaled independently All applications must be scaled together
Upgrades One part of an application can be upgraded without affecting the rest Upgrading one application may require restarting all applications
Reuse Easier to reuse prebuilt images Not as straightforward to reuse prebuilt images
Simplicity Need to manage networking between containers No need to manage networking between containers
Tightly-Coupled Processes Not a concern if applications are loosely coupled Might be a requirement if applications are tightly coupled

Source:

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more