Skip to content

ASP.NET Core 6.0 - Load Balancing with Nginx | Traefik | Caddy - Alpine - Docker

License

Notifications You must be signed in to change notification settings

giansalex/aspnetcore-load-balancing

Repository files navigation

ASP.NET Core HTTPS & Load balancing

Deploy an ASP.NET Core application with HTTPS & Load balancing using Docker.

Nginx

Using Nginx web server.

docker-nginx

To get started:

git clone https://github.com/giansalex/aspnetcore-load-balancing.git
cd aspnetcore-load-balancing
docker-compose build
docker-compose up -d --scale core-app=4 --no-recreate

IMPORTANT: Due to NGINX (Free version) limiations, current configuration is set to work with a fixed scale of 4 nodes. With NGINX Plus, additional changes might be applied to scale up and down dynamically.

Traefik

Using Traefik Edge Router.

git clone https://github.com/giansalex/aspnetcore-load-balancing.git
cd aspnetcore-load-balancing
docker-compose -f docker-compose.traefik.yml build
docker-compose -f docker-compose.traefik.yml up -d --scale core-app=4

Caddy

Using Caddy Server web server.

git clone https://github.com/giansalex/aspnetcore-load-balancing.git
cd aspnetcore-load-balancing
docker-compose -f docker-compose.caddy.yml build
docker-compose -f docker-compose.caddy.yml up -d --scale core-app=4 --no-recreate

Browser

Navigate to https://localhost

app-on-browser