English | 中文
Quickly experience Polaris' service current limiting capabilities in dubbogo
Polaris Server Standalone Version Installation Documentation
Polaris Server Cluster Version Installation Documentation
Polaris Service Current Limitation Documentation
When using PolarisMesh‘s service current limiting capability, you need to enable PolarisMesh’s registration discovery function in dubbogo firstly.
dubbo: registries: polarisMesh: protocol: polaris address: ${Polaris server IP}:8091 namespace: ${Polaris namespace information} token: ${Polaris resource authentication token} # If the Polaris server has enabled authentication for the client, you need to configure this parameter provider: services: UserProvider: interface: org.apache.dubbo.UserProvider.Test tps.limiter: polaris-limit # Configure tps.limiter as polaris-limiter
Note: The service current limiting capability of PolarisMesh works on the Provider side.
The implementation of the PolarisMesh TpsLimiter extension point in dubbogo can automatically identify the request tag information that needs to participate in current limiting from the current RPC call context and request information according to the current limiting rules configured by the user.
Enter the cmd directory of go-server and execute the following command
export DUBBO_GO_CONFIG_PATH="../conf/dubbogo.yml" go run .
When you see the following log, it means that the server side started successfully
INFO dubbo/dubbo_protocol.go:84 [DUBBO Protocol] Export service:
Enter the cmd directory of go-client and execute the following command
export DUBBO_GO_CONFIG_PATH="../conf/dubbogo.yml" go run .
When you see the following log, it means that go-client successfully discovered go-server and made an RPC call
INFO cmd/main.go:75 response: &{A001 Alex Stocks 18 2022-11-19 12:52:38.092 +0800 CST}
When you see the following log, it means that the current limiting policy configured for go-server in PolarisMesh has taken effect
ERROR handler/rejected_execution_handler_only_log.go:73 The invocation was rejected