The Dubbo-go-pixiu gateway supports calling Dubbo clusters in GO/Java. In the Dubbo-go 3.0 scenario, we can request the pixiu gateway via HTTP protocol from outside the cluster, allowing protocol conversion at the gateway layer to further call Dubbo-go services inside the cluster.
The path for users to call Dubbo-go services is http://$(app_name)/$(service_name)/$(method).
For example, if a proto file has the following definition:
And during the startup of the dubbo-go service, the application name is configured in dubbogo.yml as my-dubbogo-app:
The pixiu gateway can then resolve the path my-dubbogo-app/org.apache.dubbo.quickstart.samples.UserProvider/SayHello and forward it to the corresponding service. The body of HTTP requests from external sources will be JSON serialized request parameters, e.g., {“name”:“test”}.
Currently, we recommend using Nacos as the registry.
Users can deploy our demo in their own cluster, preferably with the ability to expose a service of lb type, to allow public access to services within the cluster, or requests can be made directly within the cluster.
For your cluster, execute:
This will create the following resources in the dubbogo-triple-nacos namespace, including three triple-servers, one pixiu gateway, and one nacos server, exposing the service to the public through Service.
Get the external IP of the pixiu and make a call:
Call the demo service using curl and obtain the response.