Docker for traditional web application with load balancing?

This is rather a concept question than a technical question.

My question is: if I am going to

  • Not able to connect to the Docker server running on another Linux system
  • How can i access the website running inside a Docker container using IP address of container
  • Running linux container on docker windows
  • Is it safe to run docker container in production as root?
  • How to find what ports are exposed from docker image?
  • Why am I getting an ErrImagePull error in this Kubernetes deployment?
    • Setup a wordpress eshop (woocommerce) , using Apache
    • using Docker,
    • with load balancing, using HAProxy
    • implement the Micro Service Architecture

    How should I implement it?

    Here is what I came up with:

    • 1 Container: Apache + PHP
    • 1 Container: MySQL

    But I don’t know how to integrate HAProxy into the architecure.

    Can anyone please give me an idea of it?

    Also how to do load-balancing if all containers are in a single machine?

    Thank you in advance for helping.

  • Wordpress Docker Container Cannot Upload Theme
  • Shiny server inside Docker container reverse proxied with nginx will not follow 301 redirects
  • Port unreachable after deploying NGINX image to IBM Bluemix Container Cloud
  • Bash / Docker exec: file redirection from inside a container
  • Docker - cannot mount volume over existing file, file exists
  • Gitlab-runner local build - login from non TTY device
  • One Solution collect form web for “Docker for traditional web application with load balancing?”

    I have done a similar thing and that too over multiple machines.

    Firstly, unless you have multiple instances of Apache+PHP, haproxy doesnt come into the picture at all.

    Otherwise: An ideal setup would be:

    request from user–>haproxy–>multiple (Apache + PHP) –>MySQL.

    Here Haproxy would give you a common public IP(of the host machine) and port for your app to be accessed. Whenever anyone accesses this IP and port, request would be forwarded to one of your Apache+PHP containers. You will have to edit your haproxy.cfg file and list the IP and port of the containers.

    This link might help you:

    Please note that here Haproxy is running on your machine and not as a Docker container.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.