Determining stack size and scope

This is largely opinion based. We are looking for advice on how to divide our stack, and what other teams are doing.

We currently throw all our services and containers into a single mono-stack. That amounts to around 10 services and 25 or more containers. The problem with this approach is when we deploy or upgrade a service or evne group of services we are in a way effecting our entire mono-stack as they are in the same rancher-compose / docker-compose file!

There are clear lines that our stack can be broken into:

  • API (services running our API)
  • Web Frontend (services running our web frontend)
  • Web Backend (services running our back-office web interface)

Although as all these are running on the same hosts we are having trouble working out how to avoid port conflicts as all the above stacks would reside on port 80.

One option we have toyed with is having a fourth “load-balance” stack that simply routes layer 7 http requests down to the other stacks listed above. Although I’m not sure if this is the best idea?

Possible to have multiple load-balancers on the same port and on the same host from different stack? They would be routing layer 7 requests to different services of course!

The below balancers are all form different stacks, across the same hosts.

e.g.

load-balancer1
api.example.com:80

load-balancer2
example.com:80

load-balancer3
backoffice.example.com:80