3 ms·
There is one thing that really confuses me about 12 factor... It suggests that you provide the locations of backing services in the config. This seems insane,
by kazagistar 11y ago
There is one thing that really confuses me about 12 factor...
It suggests that you provide the locations of backing services in the config. This seems insane, since it means that you cannot move any backing services. Do they expect you to restart when you switch backing services? Do they expect you to run all your internal traffic through load balancers?
We provide each container with the address of the local service discovery server (Consul) and it finds what it needs itself, when it needs it. I assume everyone using this kind of setup in production is doing something similar?
- sagichmal 11y ago"Providing the location of the backing services" doesn't mean the physical address, but the logical address, managed by an e.g. load balancer, capable of abstracting over physical changes as necessary. Consul is one way to do it; DNS is another, and there are many more.
- andrewguenther 11y agoCNAMEs are perfect for this. "customer-data-service.my-product.com" could point to absolutely anything. Give your CNAME a name which is meaningful no matter what service is behind it and you'll never need to change it (externally).
- dominotw 11y agoany problem can be solved with a layer of abstraction.
- jacques_chester 11y ago> Do they expect you to restart when you switch backing services? Do they expect you to run all your internal traffic through load balancers? 12 Factor was pioneered by Heroku, so yes. Edit: I don't understand the downvote. This is the factual answer. 12 Factor apps are supposed to delegate a lot of cross-cutting concerns to the platform, including the problem of "where does that service live?" and "can you give me another chunk of service?"