Dubbo proxy

The dubbo proxy filter decodes the RPC protocol between dubbo clients and servers. the decoded RPC information is converted to metadata. the metadata includes the basic request ID, request type, serialization type, and the required service name, method name, parameter name, and parameter value for routing.

  • v3 API reference

  • This filter should be configured with the name envoy.filters.network.dubbo_proxy.

Statistics

Every configured dubbo proxy filter has statistics rooted at dubbo.<stat_prefix>. with the following statistics:

Name

Type

Description

request

Counter

Total requests

request_twoway

Counter

Total twoway requests

request_oneway

Counter

Total oneway requests

request_event

Counter

Total event requests

request_decoding_error

Counter

Total decoding error requests

request_decoding_success

Counter

Total decoding success requests

request_active

Gauge

Total active requests

response

Counter

Total responses

response_success

Counter

Total success responses

response_error

Counter

Total responses that protocol parse error

response_error_caused_connection_close

Counter

Total responses that caused by the downstream connection close

response_business_exception

Counter

Total responses that the protocol contains exception information returned by the business layer

response_decoding_error

Counter

Total decoding error responses

response_decoding_success

Counter

Total decoding success responses

response_error

Counter

Total responses that protocol parse error

local_response_success

Counter

Total local responses

local_response_error

Counter

Total local responses that encoding error

local_response_business_exception

Counter

Total local responses that the protocol contains business exception

cx_destroy_local_with_active_rq

Counter

Connections destroyed locally with an active query

cx_destroy_remote_with_active_rq

Counter

Connections destroyed remotely with an active query

Implement custom filter based on the dubbo proxy filter

If you want to implement a custom filter based on the dubbo protocol, the dubbo proxy filter like HTTP also provides a very convenient way to expand, the first step is to implement the DecoderFilter interface, and give the filter named, such as testFilter, the second step is to add your configuration, configuration method refer to the following sample

  1. filter_chains:
  2. - filters:
  3. - name: envoy.filters.network.dubbo_proxy
  4. typed_config:
  5. "@type": type.googleapis.com/envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy
  6. stat_prefix: dubbo_incomming_stats
  7. protocol_type: Dubbo
  8. serialization_type: Hessian2
  9. route_config:
  10. name: local_route
  11. interface: org.apache.dubbo.demo.DemoService
  12. routes:
  13. - match:
  14. method:
  15. name:
  16. exact: sayHello
  17. route:
  18. cluster: user_service_dubbo_server
  19. dubbo_filters:
  20. - name: envoy.filters.dubbo.testFilter
  21. typed_config:
  22. "@type": type.googleapis.com/google.protobuf.Struct
  23. value:
  24. name: test_service
  25. - name: envoy.filters.dubbo.router