ratio
> Documentation > Docs > INFINI Gateway > References > Online Filter > ratio

ratio #

Description #

The ratio filter is used to forward normal traffic to another flow proportionally. It can implement canary release, traffic migration and export, or switch some traffic to clusters of different versions for testing.

Configuration Example #

A simple example is as follows:

flow:
  - name: ratio_traffic_forward
    filter:
      - ratio:
          ratio: 0.1
          flow: hello_world
          continue: true

Parameter Description #

NameTypeDescription
ratiofloatProportion of traffic to be migrated
actionstringThe action when hit, can be drop or redirect_flow, default is redirect_flow
flowstringNew traffic processing flow
continueboolWhether to continue flow after hit. Request returns immediately after it is set to false. The default value is false.