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:

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn 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

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay