Score:0

Which Docker container layout pattern is to be avoided?

mv flag

I would like to run two web services on a single physical server using Docker. Both services require a web server and a SQL database. The following setups are thinkable ([ ... ] marks a Docker container):

  1. One docker container per service
[ sqld + httpd + service A ]
[ sqld + httpd + service B ]
  1. One docker container per process
[ sqld for A ] [ httpd for A ] [ service A ]
[ sqld for B ] [ httpd for B ] [ service B ]
  1. Shared sub-services
[ sqld ] [ httpd ] 
[ service A ] [ service B ]
  1. Combined shared sub-services
[ sqld + httpd ] 
[ service A ] [ service B ]

I can see benefits and drawbacks with either model, e.g. when it comes to process management/monitoring or when planing to move a service from one server to another one.

Are you aware of any technical reasons that would eliminate some of these choices, e.g. because it would be impossible to manage such a setup in a meaningful way or as security concerns clearly speak against them?

I'm not asking for an opinion here, like "Personally I prefer setup number ..., as ..."; it's okay to have a preferences and feel free to let me know about it but my concern here is only if there objective reasons that clearly speak against one of these setups. If I can rule out one or two of these, it will be much easier to weight the pros and cons of the remaining setups to my personal needs. And so far I see no reason that makes either setup impossible or clearly speaks against it but I might be overlooking something.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.