English | δΈζ
Dubbo-Go-Pixiu is a high-performance API Gateway built with Go. As a key component of the Apache Dubbo ecosystem, it provides rich traffic management, protocol conversion, and security protection capabilities.
- High Performance: Built with Go for low-latency, high-throughput gateway capabilities.
- Seamless Dubbo Integration: As the official Sidecar solution, it allows non-Java applications (Go, Python, Node.js, etc.) to easily call Dubbo services.
- Cloud-Native by Design: Built for modern microservices and cloud-native architectures, with full support for containerized deployment.
- Highly Extensible: A flexible filter and plugin mechanism allows you to easily customize its functionality.
Try Pixiu Gateway features now: Visit our Samples.
We are upgrading Pixiu into a next-generation AI Gateway, designed to be the bridge connecting users to Large Language Models (LLMs). With Pixiu, you can:
- Simplify Access: Access various LLM services in a unified and secure manner.
- Enhance Capabilities: Leverage the gateway's powerful plugin system to add features like authentication, observability, and traffic control to your AI applications.
- Cost-Effectiveness: Optimize your AI service costs through fine-grained billing, auditing, and caching strategies.
Try the AI Gateway features now: Visit our AI Gateway Samples.
Feature Category | Description |
---|---|
π Protocol Processing | Supports proxying and mutual conversion between HTTP, gRPC, Dubbo2, and Triple protocols, offering powerful protocol gateway capabilities. |
π‘οΈ Security Protection | Provides multiple security mechanisms like HTTPS, JWT token validation, and OAuth2 to safeguard your services. |
π Service Discovery | Seamlessly integrates with registries like Zookeeper and Nacos to automatically discover services from Dubbo and Spring Cloud clusters. |
βοΈ Traffic Governance | Integrates with Sentinel to provide fine-grained, multi-protocol rate limiting, circuit breaking, and service degradation. |
π Observability | Integrates with OpenTelemetry and Jaeger to provide distributed tracing, metrics, and logging. |
π¨ Visual Management | The accompanying Pixiu-Admin console provides a friendly web UI for remote service management and visual configuration. |
This guide will walk you through starting a Pixiu gateway based on our samples and accessing a backend Dubbo service via the HTTP protocol.
- Go 1.17 or higher.
- Two separate terminal windows.
In Terminal 1, execute:
git clone https://github.com/apache/dubbo-go-pixiu.git
cd dubbo-go-pixiu
In Terminal 2, execute:
git clone https://github.com/apache/dubbo-go-pixiu-samples.git
cd dubbo-go-pixiu-samples/http/simple
# This will start a simple HTTP server as the backend
go run http/simple/server/app/*
Return to Terminal 1 and start Pixiu with the following command. Please replace [absolute-path]
with the absolute path to your local dubbo-go-pixiu-samples
directory.
go run cmd/pixiu/*.go gateway start -c /[absolute-path]/dubbo-go-pixiu-samples/http/simple/pixiu/conf.yaml
When you see logs similar to the following, Pixiu has started successfully and is listening on port 8888
:
2025-05-19T12:46:00.104+0800 INFO server/pixiu_start.go:127 [dubbo-go-pixiu] start by config : &{StaticResources:{Listeners:[0xc0007b7a20] Clusters:[0xc0007cc5a0] Adapters:[] ShutdownConfig:0xc00067fb30 PprofConf:{Enable:false Address:{SocketAddress:{Address:0.0.0.0 Port:8881 ResolverName: Domains:[] CertsDir:} Name:}}} DynamicResources:<nil> Metric:{Enable:false PrometheusPort:0} Node:<nil> Trace:<nil> Wasm:<nil> Config:<nil> Nacos:<nil> Log:<nil>}
2025-05-19T12:46:00.104+0800 INFO healthcheck/healthcheck.go:157 [health check] create a health check session for 127.0.0.1:1314
2025-05-19T12:46:00.105+0800 INFO tracing/driver.go:76 [dubbo-go-pixiu] no trace configuration in conf.yaml
2025-05-19T12:46:00.105+0800 INFO http/http_listener.go:157 [dubbo-go-server] httpListener start at : 0.0.0.0:8888
Test the gateway using curl
or the provided test files:
# Option 1: Run test files
go test -v ./http/simple/test/
# Option 2: Run the test script using curl
./http/simple/request.sh
More usage examples can be found in the dubbo-go-pixiu-samples.
We also provide Docker images for quick and easy deployment.
1. Build Docker Image from Source Code
Make sure you are in the root directory of the project (where the Dockerfile
is located), then run the following command to build the image:
# You can customize the image name and tag, here we use dubbo-go-pixiu:local
docker build -t dubbo-go-pixiu:local .
It may take a few minutes to build. Once successful, you can use the local image named dubbo-go-pixiu:local
.
2. Run Pixiu with Default Configuration
Start a container using the local image you just built:
docker run --name pixiu-gateway -p 8888:8888 -d dubbo-go-pixiu:local
3. Run with Custom Configuration File
If you need to use your own configuration file, you can mount a local file to the container's /etc/pixiu/
directory.
# make sure to use the local image name you built, i.e., dubbo-go-pixiu:local
docker run --name pixiu-gateway -p 8888:8888 -d \
-v /your/local/path/conf.yaml:/etc/pixiu/conf.yaml \
-v /your/local/path/log.yml:/etc/pixiu/log.yml \
dubbo-go-pixiu:local
For more information, visit the Pixiu Docker Hub.
The powerful Pixiu management plane pixiu-admin
has been migrated to this repository and can be used for visual configuration of service discovery, traffic management, and security policies.
Quick Start with Docker Compose:
cd /[absolute-path]/dubbo-go-pixiu
docker-compose up -d
After starting, you can access the management plane by opening http://localhost:8080
in your browser.
We warmly welcome all forms of contributions! Whether it's submitting an issue, proposing a new feature, or contributing code, your participation is vital to the project.
- Join Our Community:
Join our discussion group through Ding talk, WeChat, or Discord.
discord https://discord.gg/C5ywvytg
If you like Dubbo-Go-Pixiu, please give us a β on GitHub!
This project is licensed under the Apache License, Version 2.0.