Question about multiple containers, with load balancer on DO


(RJ) #1

It seems that multiple containers are the way to go in terms of flexibility/scalability. It was suggested that one droplet could contain the data tier and another droplet for the web-only. However if I’m planning on using DO’s load balancer, does that mean that each droplet would have to contain 1 web-only and 1 data, albeit in separate docker containers?

*Excuse me for any mistakes, I’m not too familiar with these architectures and previous questions are a few years old.


(Jeff Atwood) #2

Multiple servers, not multiple containers on the same machine. I suppose you could try that with a giant droplet but doesn’t this defeat the point of making you more resistant to server failure?


(RJ) #3

I wanted something relatively easy to propagate so I only add what I need in the future since I’m just starting out now. If the load balances relatively equally to each droplet doesn’t that make the server less likely to fail unless the server where the droplet is fails? So for example I get the 8GB droplet, split it in half separate docker containers for the data and web (so 2 of each) I load balance them so I alternate between which one is more available.


(RJ) #4

Or could someone help me determine a schema similar to what I’m describing but makes more sense logistically?

Any help would be appreciated I’m really excited to build our platform with this software.


(Michael - DiscourseHosting.com) #5

Can you start by explaining why you need load balancing from the start in the first place? Better to solve problems when you have them… building your community is harder than scaling your servers.


(RJ) #6

we’re expecting high influx of users, but in spurts. We are having some members migrate from a fairly large community and my investors were insistent that the servers should be able to handle ally types of traffic; one of the main problems of the other site was server reliability. I realize maybe the load balancer might be overkill at this point in time but I thought it would atleast help to make sure resources are provided more equally…also I thought it would be better maintainability-wise to have my basic architecture in place already…


(Michael - DiscourseHosting.com) #7

You never know where you’ll need to scale beforehand.
It can be disk space, CPU cores, memory. Even when overdimensioning heavily you’ll not be able to predict what will be the bottleneck.

That, and scaling up (“just get a bigger server”) could also work pretty well, and it keeps your complexity low.


(RJ) #8

Thanks for the help Michael. What would you suggest for the architecture? It seems the multiple container approach is more secure and flexible. So a data container and web only container (in their own droplet?) would suffice for the foreseeable future?


(Michael - DiscourseHosting.com) #9

That would be absolutely sufficient. If I were you, I’d even go for the most simple setup: everything in one. You’d be able to scale out to at least ten million pageviews per month before getting into any kind of trouble at all.


(RJ) #10

that was exactly the info I was looking for, albeit in a complicated way!
Thanks so much Michael!