‫Verification or is back.
‫What is your opinion on the usage of supervisor D.
‫So that's a great question.
‫Supervisor D I'm assuming what you're referring to is putting supervisor in the container and running
‫it as the PID one or the root process right in that container.
‫That is fine if you need to do it right.
‫I know Docker is best practices are never more than one app per container.
‫And I like to expose sort of take that idea and say it's really never more than one concern per container.
‫And when in some cases that concern might be multiple executable.
‫And so you would need to start of those with something else.
‫And it could be some sort of fancy shell scripting.
‫I like using supervisor D.
‫In fact if you look at my HP repo I do that I have a horribly outdated P HP repo for level so I definitely
‫need some updates to use some of the modern new Docker features but it shows off a couple of things
‫that are unique and one of those is that for PDP when you're using NPM you need the PDP executable running
‫and the engine X executable running and you could run those in separate containers and that would probably
‫be the official Docker way to do it.
‫If you were following their guidelines but their guidelines are just that they're just like best practices.
‫They're the place to start but it doesn't mean you have to stay there if you know what you're doing
‫and why you're doing it.
‫So in my case I would in this particular example I combine both engine X and the p HP FGM into the same
‫container image and I run them both with supervisor D and so it adds another layer of complexity because
‫now I have Docker running a container that's actually running supervisor as supervisors running engine
‫X and FGM but I find that it works well and I've ran.
‫I've run this on very large global Web sites that are running in lots of regions and abuse.
‫So this design is definitely time tested and is used in heavily heavy scenarios.
‫The reason I like this is because Docker and swarm out of the box don't have the concept of a pod.
‫If you're in Cuba and 80s world you have a pod concept and in that case you could run the engine X and
‫the PSP side by side in their own containers inside the same pod and that pod is deployed together.
‫So when it's deployed onto a server you would know that you'd get both and then they would both be able
‫to use the sockets if you're familiar with this stuff and PSP they use the sockets to talk back and
‫forth and that's very efficient but in the docker swarm way you would do it of the box that way you
‫would have to talk over TGP and that adds lots of lag.
‫I mean that lots of lag it's maybe fine for some people but when you're talking about going across server
‫instead of just talking over a local socket inside the same kernel there's definitely added you know
‫possibly multiple milliseconds if not tens of milliseconds of delay there.
‫So I like to run them both in the same container and I use supervisor D to do that.
‫So check out that example.
‫I will throw that in chat.
‫I think I saw someone post that in there already.
‫So hopefully that helps you out and that answers your question.
‫There's only a few places by the way that I use supervisor D and that's one of them.
‫The other one might be like cold fusion because it also needs like a patch or something on the front
‫end in order to work or area Gen-X.
‫So anytime you have something where you've got a back in binary that has to run to Amul to run your
‫code and then you need some sort of web server in front of it and they have to both work together to
‫to deliver the service it total because they're always going to be deployed together and one doesn't
‫work without the other.
‫It makes complete sense that they go together in that case in the same image especially when you scale
‫them if you're always going to scale them one for one because a lot of things with containers you would
‫want to scale differently right you're gonna scale the number of API is different you're going to scale
‫the number database container.
‫So in those cases you definitely with the flexibility and you want to build to update them on separately.
‫In this case I'm just going to update the app at the same time and I'm always going to replace the containers
‫at the same time so it makes a lot of sense to do those together so hopefully that helps.