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.

  • v2 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 redis.. 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. config:
  5. stat_prefix: dubbo_incomming_stats
  6. protocol_type: Dubbo
  7. serialization_type: Hessian2
  8. route_config:
  9. name: local_route
  10. interface: org.apache.dubbo.demo.DemoService
  11. routes:
  12. - match:
  13. method:
  14. name:
  15. exact: sayHello
  16. route:
  17. cluster: user_service_dubbo_server
  18. dubbo_filters:
  19. - name: envoy.filters.dubbo.testFilter
  20. config:
  21. "@type": type.googleapis.com/google.protobuf.Struct
  22. value:
  23. name: test_service
  24. - name: envoy.filters.dubbo.router