Nginx – use multiple Docker containers in a single host

I have a physical server running Nginx, MySQL, and serving my PHP website. The server has a multi-core processor with 16 GB RAM. This server can handle a certain amount of Web Traffic.

Now instead of this single server, if I run multiple docker containers, run various instances of Nginx (App Server) and MySQL (DB Server) in them and in the application and database containers Between load balancing, will it be able to handle the same amount of traffic as a single server to handle it or will it be less (performance wise)?

If I use a virtual server such as EC2 or Digital Ocean Leaflet with the same hardware configuration instead of a physical server, what is the performance?

Since all processes are running on the local host (you can run on the host outside the container ps aux and look at them). There should be very little overhead. The network bridge and IP table entries that forward the packets to the virtual host will add some CPU overhead, but I can’t imagine it being too heavy.

I have a physical server running Nginx, MySQL, and serving my PHP website. The server has a multi-core processor with 16 GB RAM. This server can handle a certain amount of web traffic.

Now instead of this single server, if I run multiple docker containers, run various instances of Nginx (App Server) and MySQL (DB Server) in them and load balance between the application and the database container, it Will it be able to handle the same amount of traffic as a single server or will it be less (performance wise)?

If I use a virtual server such as EC2 or Digital Ocean Leaflet with the same hardware configuration instead of a physical server, what is the performance?

Since all processes are running on the local host (you can run ps aux on the host outside the container and view them). There should be very few Overhead. The network bridge and IP table entries that forward packets to the virtual host will add some CPU overhead, but I can’t imagine it being too heavy.

Leave a Comment

Your email address will not be published.