spring-cloud / spring-cloud/spring-cloud-commons
Restrict / organize local IP address used to register service when starting Spring Cloud Application
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
I have many local IP addresses on my host. Some of them are IPs from VMWare and VirtualBox adapters, e.g. they are inaccessible from outside! Here is the sample output (for Windows):
$ ipconfig | find "IPv4"
IPv4 address. . . . .: 192.168.55.1
IPv4 address. . . . .: 10.11.12.38
IPv4 address. . . . .: 172.16.10.5
IPv4 address. . . . .: 192.168.87.29
When I start SpringCloud application, it's health on Spring Cloud server (Eureka?) dashborad is marked as "Unknown". Moreover, on server dashboard it shows my registered service with "invalid" (e.g. inaccessbile from outside!) IP "192.168.55.1" (this is a first IP from my list, but it is a Virtual Adapter IP address). I suppose, that there is no route from SpringCloud server (Eureka?) to this IP, thats why my service's health is unknown (it cannot ping back service).
I want to restrict my SpringCloud service application to register on Eureka server using only certain IP addresses (or addresses list).
I want this to be done using some kind of application property like this:
spring.server.preferredAddreses=10.X.X.X,192.168.87.X
This would mean: use first available IP from 10.X.X.X. network to register to Eureka, if it fails, use first available IP from 192.168.87.X network.
IP addresses mask could be in some standards form, we also can provide ranges using dash etc.
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
The issue names no source files or tests. Start by reproducing service registration with multiple local adapters and trace how the Spring Cloud application selects its Eureka registration address. Done means an agreed configuration can restrict and order eligible address ranges, with coverage for the selection behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100