You can probably use the Docker container health check. Traefik will only forward requests to healthy containers. Healthchecks can be defined as addition in a compose file.