spring-cloud / spring-cloud/spring-cloud-gateway

r2dbc RouteDefinitionLocator implementation

Open
#1,667 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.