> - I also do 1 proc/Docker image, I would recommend to have a look on > https://pythonspeed.com/docker/ for various things to keep in mind if you > haven’t seen it already. > > I am very familiar with the trade offs and tuning of process vs. threads. > Now, when this conversation is going on, would someone comment trade offs > between container vs. process? Is it radically more memory/CPU sensitive? Are > things like logging and external service API access harder to arrange? What > are the trade offs and benefits?
It’s definitely a trade-off between juicing everything you can out of your hardware vs operational maneuverability. I’m not even convinced that you shouldn’t have have more than one worker process per container, it’s just much easier to have introspection and pull-based metrics that way (just expose a /-/.* namespace in a view and you’re done). Essentially you’re simplifying your apps to an easy to handle building block and move that complexity into your cluster managers, load balancers, log aggregators, service discovery, service meshes, … I’ve also given a talk that tries to build and reason up to that building block ideal last year: <https://hynek.me/talks/deploy-friendly/>. I don’t talk about performance characteristics at all though since the focus is to make deployments easier, not make apps faster. :) Whether or not that’s worth it to you, depends entirely on your use case. For instance one of the authors of the Bloomberg uWSGI article I linked before gave a talk on that topic and mentioned that they run everything on metal because their apps are computational expensive. And I’m sure they have a bunch of Kubernetes clusters laying around, so for them it’s literally choosing what’s “best for their workload” and not “what’s easiest”. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/24D4A599-4D63-4A1A-84C3-3FA7B77EF1B6%40ox.cx.
