spring-cloud / spring-cloud/spring-cloud-gateway
How to loadbalance for dynamically added routes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
just a question.
I use Spring Cloud Gateway 3.1.3 version. And I use actuator api to add route for service dynamically.
For example, service A run localhost in 8000 port, so I add a gateway route by rest api which uri as 'http://localhost:8000'.
now I need service A have two instances, and I can add instance uri dynamically.
I find gateway with spring cloud loadbalancer can proxy two instances, like this: https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#simplediscoveryclient
but I still need config instance uri, can't dynamically add info.
So, Is there any way to realize this idea of mine? Anyone help me?
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 Spring Cloud Gateway 3.1.3 actuator route API described in the issue, then read the linked Spring Cloud LoadBalancer SimpleDiscoveryClient documentation. A useful resolution should determine whether instance URIs can be added dynamically for a route and document the supported configuration or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100