New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Having 200 websites for a single docker container will be good for reducing overhead, although as you mentioned, that would be negligible (and computing and storage is very cheap nowadays).
I think running each in different containers will be better for security and scalability, as you can manage each container individually on a cluster and monitor spikes. Just my thoughts.
so, even 200 webserver the overhead is still negligible, good to know
If we have to choose between just 2 options, it should be 200 sites on a single docker.
Do you have the 3rd better option?
200 dockers == more overhead on memory/network/cpu. Even though they are getting cheaper it is a no excuse for a bad design/waste of resources.
How much overhead tough. If the overhead is small / negligible then, I don't really mind, for the benefit of more isolated containerization.
For the context of the discussion I am talking about Wordpress. I manage wordpress website for my customer, with very specific, template, plugin and functionality.
>
I have the same Question, What is the best for hosting many WP site (between 100 to 150) use one big server, or a few websites per 1 server.
You should look into some benchmarks to get specific numbers. i.e https://k6.io/blog/wordpress-bare-metal-vs-wordpress-docker-performance-comparison (Just some quick googling). For almost everyone, the application portability and being able to faster deliver software with Docker outweighs the little performance difference.
What happens when this one server fails/crashes? I think you have your answer there.
For better isolation and performance I usually put every customer on a dedicated vps. Especially with wordpress.
Id say, 1 big nginx and every website its own php container..
Can Hetzner Cloud CX11 plan, with this specs :
1 vCPU
2 GB RAM
20 GB Disk space
20 TB Traffic
Handel Hundreds of even a few thousand visits for a (3 to 6) WooComemrce websites, I am planning to use LiteSpeed Enterprise, and CyberPanel As Web Panel for the server
define "visits" first. concurrent request or a total per day
and maybe this would answer @yokowasis 's question. what if the only one docker stop working?
So the best option is few websites per 1 server ?
But how to manage all this servers in 1 place ? lets say I dont use Hetzner Cloud !
Per day, they are small websites.
hundreds of visits on each website, it can.
thousands? maybe
Who said overhead of running 200x nginx webservers versus single nginx with 200 websites is "negligible"?
Anyway, in "200 Docker 1 website each" scenario, overhead (at least that related to docker technology) is your least problem. Much bigger problem is: how do you want to split traffic to them? Do you have 200 IPs ready to sacrifice, so that every web-server can listen on its own?
It is no big deal to have one webserver with name-based hosting serving 200 virtual sites on single IP, but how do you want to do it with 200 web-servers? They can not all listen on the same IP. They could listen on private IPs, but then you need some common front-end with ssl termination to properly split/route traffic. And then do not forget updating, which is sure easier to do on single docker container. Etc, etc. I think complications outweight benefits, so I'd vote for "1 Docker, 200 websites". Ultimately, that's what name-based hosting is for...
thousands? maybe
Few thousands for all websites per day, max 2-5K visits, i think it can handel it ?
Simplicity: 1 docker> @Jarry said:
This is why, container orchestration exist
All issue written on your comment already solved by the people that has same thinking with you
Resource overhead? Of course happened. But sometimes the isolated environment is a must
200 webservers + 200 db servers + 200 php-fpm masters sounds a huge waste of RAM!
You can isolate php processes with different users, it can be enough if done right. Depends what kind of isolation you need.
Keep in mind that docker wasn't created with security in mind, it's not gonna give you XEN/KVM or even LXC's isolation if an attacker wanna play with your stuff...
Then just recreate / redeploy the docker container. It's not like the docker container have any persistent data on it. That's the beauty of docker.
200 webservers + 200 php-fpm masters can use one db server.
I read some stackoverflow, it said the performance negligible, it doesn't states 200 docker container.
I don't need them to listen on their own IP. I will just spin a nginx reverse proxy with 1 public ip, and direct each domain to specific upstream / container.
Regarding updates actually docker is easier. Just update one image, and redeploy the rest.
So yeah, I am still concerned about overhead. If it's anything like nodejs, where one idle instance cost 20MB of RAM, that's 4GB of RAM wasted for idling.
I have been using docker & kubernetes for a few years and can tell you it does not solve everything. Problem of running many web-servers (not web-sites) on single public IP is far more complicated...
I was referring to 1 vs 200 nginx web-servers. Performance penalty of running single or 200 docker containers alone may be negligible, but those containers are not empty! 200 nginx web-servers running in 200 docker containers (each of them serving single website) together need more RAM, than single docker container with single nginx web-server (serving all those 200 websites). You can not question this...
Idk. I've never used hetzner.
Simplest, highest performing: no docker.
Good point. I was was preparing to write the same thing after reading it all.
Which is almost the same with 1 docker.
lol
also php-fpm, mysql, ssh and anything else the containers run.