spring-cloud / spring-cloud/spring-cloud-gateway
r2dbc RouteDefinitionLocator implementation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
For every new API in microservices. I've to update the route in method public RouteLocator gatewayRoutes(RouteLocatorBuilder builder) of Spring Cloud Gateway and deploy the same.
I read "Future milestone versions will have RouteDefinitionLocator implementations based off of Spring Data Repositories, such as Redis, MongoDB, and Cassandra." on https://cloud.spring.io/spring-cloud-gateway/reference/html/ hence wanted to know if this can expected soon.
Describe the solution you'd like
A Redis or Mysql Route Configuration with a mechanism to auto refresh or periodic refresh in built.
Describe alternatives you've considered
An alternative I've thought is to rebuild routes in Spring Cloud Gateway itself by fetching routes from external source (db, service) manually. The routes would be built by overriding getRouteDefinitions and implementing RouteDefinitionLocator .This can be initiated from "/actuator/gateway/refresh". Not sure if this will work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the RouteDefinitionLocator and getRouteDefinitions entry points named in the issue, then read the Spring Cloud Gateway reference section on repository-backed implementations and the actuator gateway refresh endpoint. Done would mean routes can be loaded from an external store and refreshed without manually rebuilding gateway routes; the issue does not name files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql, redis, spring, spring-boot
- Domain
- api, backend, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100