Open sdelamo opened 9 months ago
I created a sample guide with a sample implementation using ProxyHTTPClient
Hello @sdelamo I've been working in an api gateway also, 1 module for HTTP and 1 module for gRPC maybe you can have a look on it ? https://github.com/FrogDevelopment/micronaut-api-gateway/tree/develop/micronaut-api-gateway-http
Hello @sdelamo, there are my use cases for the API gateway. My idea is to have one micro-service with common logic, e.g. session management, customer routing, etc. So in GW I have an Auth layer with sessions, a converter of sessions into internal JWT, outgoing filter for http requests to private API to transfer JWT in headers.
This helps me to prevent accidental API publication and all my micros know nothing about sessions. They just work with security contexts which is propagated. One of the biggest questions is configuration. Configuration of such services could be quite big because of the amount of micros or some additional features like circuit-breaker. Because of this, I prefer programmatic API to configuration files. My classes could be logically split and reuse configuration.
I don't see GW as a separate runtime for Micronaut. It's more like a feature (like sessions) because it gives me the ability to extend my GW as usual microservice for future unknown cases.
see: https://docs.spring.io/spring-cloud-gateway/docs/current/reference/html/