Reputation: 441
After playing around with docker for a week or so, I thought it may be a good idea to dockerize my 4 Apache virtual hosts, each in its own container. I will then have NGINX in front (also in a container) to proxy to these virtual hosts based on domain name.
My question is, since I am going to run NGINX and 4 full instances of Apache, will that not be much more of a resource hog, than having one Apache instance (not dockerized) with 4 virtual hosts?
On the other hand, I will be able to tweak the Apache configuration for each vhost in a container on an individual basis, which would make sense as some sites are much more busy than others.
What would be best practices be in this situation?
Thanks!
Upvotes: 1
Views: 773
Reputation: 28987
It does depend on how you configure apache; by default apache is configured to use lots of resources; you could decide to tune-down your apache configuration to use less resources, and spin up more instances (containers) if more capacity is needed.
Upvotes: 1