Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


1 Docker 200 Website, vs 200 Docker 1 website each. Which one is better performance wise ?
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.

1 Docker 200 Website, vs 200 Docker 1 website each. Which one is better performance wise ?

yokowasisyokowasis Member
edited June 2020 in General

Any Idea How much is the overhead ? From I read, the overhead is negligible. But then again, this is 200 webserver we talking about.

I am talking about nginx webserver + PHP FPM.

«1

Comments

  • lentrolentro Member, Host Rep

    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.

    Thanked by 1vimalware
  • @levnode said:
    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?

  • umiumi Member
    edited June 2020

    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.

    Thanked by 1o_be_one
  • @umi said:
    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.

  • @yokowasis said: 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.

  • QuintenQuinten Member
    edited June 2020

    @yokowasis said: 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.

    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.

    @adilolv said: 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.

    What happens when this one server fails/crashes? I think you have your answer there.

  • umiumi Member
    edited June 2020

    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

    Thanked by 1Hetzner_OL
  • @adilolv said:
    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

  • @Quinten said:
    What happens when this one server fails/crashes? I think you have your answer there.

    and maybe this would answer @yokowasis 's question. what if the only one docker stop working?

  • adilolvadilolv Member
    edited June 2020

    @Quinten said: What happens when this one server fails/crashes? I think you have your answer there.

    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 !

    @blackhiden said: define "visits" first. concurrent request or a total per day

    Per day, they are small websites.

  • @adilolv said:
    Per day, they are small websites.

    hundreds of visits on each website, it can.
    thousands? maybe

  • JarryJarry Member
    edited June 2020

    @yokowasis said:
    Any Idea How much is the overhead ? From I read, the overhead is negligible. But then again, this is 200 webserver we talking about.

    I am talking about nginx webserver + PHP FPM.

    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...

    Thanked by 2t0m Ouji
  • @blackhiden said: hundreds of visits on each website, it can.

    thousands? maybe

    Few thousands for all websites per day, max 2-5K visits, i think it can handel it ?

  • akhfaakhfa Member

    Simplicity: 1 docker> @Jarry said:

    @yokowasis said:
    Any Idea How much is the overhead ? From I read, the overhead is negligible. But then again, this is 200 webserver we talking about.

    I am talking about nginx webserver + PHP FPM.

    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...

    This is why, container orchestration exist :smile:

    All issue written on your comment already solved by the people that has same thinking with you :smile:

    Resource overhead? Of course happened. But sometimes the isolated environment is a must :smile:

  • pbxpbx Member

    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...

    Thanked by 2Abdussamad angelius
  • @blackhiden said:

    @Quinten said:
    What happens when this one server fails/crashes? I think you have your answer there.

    and maybe this would answer @yokowasis 's question. what if the only one docker stop working?

    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.

  • @pbx said:
    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...

    200 webservers + 200 php-fpm masters can use one db server.

  • @Jarry said:

    @yokowasis said:
    Any Idea How much is the overhead ? From I read, the overhead is negligible. But then again, this is 200 webserver we talking about.

    I am talking about nginx webserver + PHP FPM.

    Who said overhead of running 200x nginx webservers versus single nginx with 200 websites is "negligible"?

    I read some stackoverflow, it said the performance negligible, it doesn't states 200 docker container.

    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?

    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.

    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...

    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.

  • JarryJarry Member

    @akhfa said:
    This is why, container orchestration exist :smile:
    All issue written on your comment already solved by the people that has same thinking with you :smile:

    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...

  • JarryJarry Member

    @yokowasis said:
    I read some stackoverflow, it said the performance negligible, it doesn't states 200 docker container.

    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...

  • @adilolv said:

    @blackhiden said: hundreds of visits on each website, it can.

    thousands? maybe

    Few thousands for all websites per day, max 2-5K visits, i think it can handel it ?

    Idk. I've never used hetzner.

  • raindog308raindog308 Administrator, Veteran

    Simplest, highest performing: no docker.

    Thanked by 2OhJohn Falzo
  • defaultdefault Veteran

    @raindog308 said:
    Simplest, highest performing: no docker.

    Good point. I was was preparing to write the same thing after reading it all.

  • @raindog308 said:
    Simplest, highest performing: no docker.

    Which is almost the same with 1 docker.

  • lol

  • @Jarry said: I was referring to 1 vs 200 nginx web-servers.

    also php-fpm, mysql, ssh and anything else the containers run.

Sign In or Register to comment.