Next.js Discord

Discord Forum

Deploying with docker - Multiple 1CPU containers, or One 2-3-4+ CPU container?

Unanswered
elfensky posted this in #help-forum
Open in Discord
I am deploying a nextjs application in docker. If I load test it with 100 simulatenous users it's slow. Should I use a single docker container with multiple cpus, or should I use multiple docker containers with 1 cpu assigned to it each, and proxy balance between them?

3 Replies

I did some basic testing, and it seems to me that running 3 1-cpu containers and load balancing between them gives me marginally better average response time than a single 3-cpu container, but I want to know if there's any best practises known here
with 3 separate containers I get
with a single 3-cpu container I get around ~6600ms