-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate third-party CMDB to utilize the labels in CMDB for service discovery #187
Comments
A good feature! What's more, we have to query cmdb for lables when registe a new instance, it's better to add a paramter for callback url when registering a new instance as follow Definition of Callback
Nacos server can get labels from the callback url , and then registe the instance with the labels |
Original proposal has been update to reflect this idea. |
* 'develop' of https://github.com/alibaba/nacos: (25 commits) Fix build error Update version Update version in banner.txt NPE protection Add plugin directory Disable CMDB by default Update default property Update version to 0.7.0 alibaba#187 Fix bug Fix alibaba#461 alibaba#187 Fix bug Update expression syntax Remove unused config Update version to 0.6.1 Fixes alibaba#432 Prepare for 0.6.1 alibaba#429 Filter services by metadata alibaba#421 Fixed alibaba#187 Refactor some logic alibaba#187 Add Java docs ...
There is a scenario that for Nacos's naming search service, one single domainname may have different IPs that come from multiple datacenters. When one single client requests domianname's associated IPs from Nacos, Nacos logic could be only return the IPs that are in the same datacenter where the client server locates.
The above scenario can be achieved by Nacos with the implementation of Label. Several notes:
API Reference for associate the IP/hostname with labels:
- String: IP
- String: hostname
- Hashmap<String, String>: labels
API Reference for hosts filtering, only target hosts matches certain label key/value that is from the client host should be returned.
- String: Domainname
- Hashmap: labels (Note, label value could be *, which means matching any values)
A callback URL should be added in case target servers are occasionally online and offline, so that Nacos server can call callback to reflect the changes. For example, if certain IP is not marked with Label when requested, an async call should be called with the callback URL to fetch the labels.
Definition of Callback
The return should be fixed format, such as
The text was updated successfully, but these errors were encountered: