Microservice architecture without service discovery Microservice architecture without service discovery kubernetes kubernetes

Microservice architecture without service discovery


that's one issue we will cover in the future in jhipster. But currently here is what you can do:

  1. inner load balancing: when starting your services in docker-compose (chack out jhipster docker-compose, then you can access the services the same as in kubernetes. If you have a "foo-app" running, you can exec into any container and curl http://foo-app/ and get routed correctly.

  2. edge routing: in kubernetes you can define several ingress paths, to make example.com/ routing to gateway:8080, example.com/foo routing to foo:8081 (if that's the configuration). Docker-compose itself doesn't have any feature for that. However, you can solve that by building an NGINX reverse proxy for that.

Check out that: https://medium.com/@joatmon08/using-containers-to-learn-nginx-reverse-proxy-6be8ac75a757

it explains pretty good how to setup something similar