Using Nginx as micro service API gateway

We are splitting our monolith API into micro services.

We do not need rate-limiting, auth, caching or any other gateway like abilities.

  • debug spring-boot in docker
  • docker Unable to connect to archive.ubuntu.com:http: [IP: 209.6.3.210 80]
  • Crontab doesn't have credentials
  • update running docker container
  • XRDP in Docker Container KDE segfault, LXDE OK
  • Using Docker-Compose, how to execute multiple commands
  • Would it be a valid approach to use very simple stateless Nginx containers that route to the underlying services?

  • Windows Image on Docker
  • crontab not working on Centos Docker container
  • Unable to create spring boot initialzr project (A org.springframework.web.client.HttpClientErrorException exception has occurred)
  • docker-compose up via Windows bat file?
  • Provider docker not found - Vagrant
  • Configuring Docker multi-container App with Spring Cloud Server for OpenShift Origin
  • 2 Solutions collect form web for “Using Nginx as micro service API gateway”

    Yes, Nginx can be a deployment and a service (of loadbalancer or externalIP type) and can forward to upstream services.

    You might have to frequently change the nginx.conf though (when you add/remove services), so I would recommend using a ConfigMap to keep your nginx.conf and mounting that as a volume in your deployment. Refer: http://kubernetes.io/docs/user-guide/configmap/ and scroll down to consume configmap via volumes.

    Another thing to keep in mind is that if you delete and create a service that is referred to in nginx.conf as an upstream service, you’ll have to restart your deployment because nginx resolves all service DNS labels when nginx starts.

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