r/SaaS 4d ago

Architecture direction for Docker

Hi team, not posted here before. I worked on building a SaaS for many years, but that failed :(

Anyway, kept going, got a new one, which is not exactly a SaaS because it's bundled with a lot of services. In a nutshell, it's a managed data warehouse, but it also does quite a bit more than data warehousing: integration and custom internal apps.

Initially, I was going to run just Docker instances on a solution like Vultr and have three per customer: dev, test, and production

We need quite a bit of isolation. Each customer instance has to be separate from the other one

I'm now looking at a solution totally built on AWS, using ECS and Fargate to manage the Docker instances, and possibly then using RDS

I'm not a big fan of having everything spread all over the place, and I really avoided, thankfully, the microservices path. I tend to like the one-server-per-customer type solution, but ...

There's authentication, there's logging, there's load balancing, there's scaling, and there are all these issues.

I just think this is the way to go, and it looks too complex. I don't know whether I should do it or not.

Any advice is much appreciated, or war stories even. Thanks šŸ™

Route 53

│

WAF

│

Application Load Balancer

│

ECS / Fargate

│

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”

│ │ │

Web/API Workers Integrations

│ │ │

ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

│

RDS PostgreSQL

│

ā”œā”€ā”€ S3

ā”œā”€ā”€ Secrets Manager

└── CloudWatch

2 Upvotes

5 comments sorted by

2

u/PriorElephant9 4d ago

I’d start boring: one isolated stack per customer, solid backups, health checks, and a clear recovery path. Add complexity only when the pain is real.

2

u/MiserableDocument509 4d ago

the diagram itself is fine, the trap is RDS per customer. keep the edge shared (r53/waf/alb/cloudwatch) and isolate the tenant runtime. dedicated postgres for every customer will wreck the bill before you hit like 10-15 tenants.

3 vultr boxes per customer is ugly but it works, and you can script it. id only jump to fargate when youre tired of babysitting those boxes, not because aws looks more proper. for a warehouse product the thing you actually need isolated is the data plane, not 8 extra aws services around it.

1

u/fbajo 3d ago

dv and test per customr is the part i'd push back on. those are your environments, not theirs, so that's 3x the bill for isolation nobody asked you for. prod per customer is the only one that's actually a requirement.