Application-Level Service Discovery
Reference article “Dubbo takes an important step towards cloud native application-level service discovery analysis”
Reference repository: dubbo-go-samples/registry/serivcediscovery
Configuration
- Consumer side
dubbo:
registries:
demoZK:
protocol: nacos
address: 127.0.0.1:8848
registry-type: service # Specify the registry as application-level service discovery, if not filled, it defaults to interface level
metadata-report: # Define metadata center
protocol: nacos # The metadata center can choose nacos/zk
address: 127.0.0.1:8848
consumer:
references:
GreeterClientImpl:
protocol: tri
interface: com.apache.dubbo.sample.basic.IGreeter
- Provider side
dubbo:
registries:
demoZK:
protocol: nacos
address: 127.0.0.1:8848
registry-type: service # Specify the registry as application-level service discovery, if not filled, it defaults to interface level
metadata-report: # Define metadata center
protocol: nacos # The metadata center can choose nacos/zk
address: 127.0.0.1:8848
protocols:
triple:
name: tri
port: 20000
provider:
services:
GreeterProvider:
interface: com.apache.dubbo.sample.basic.IGreeter
Compared with the conventional configuration, after defining registry-type: service and defining the metadata center, application-level service registration/service discovery will be used.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified January 2, 2023: Enhance Dubbogo docs (#1800) (71c8e7227)