Skip to content

Commit

Permalink
Enable ZMQ between GNMI and Orchanget (sonic-net#16661)
Browse files Browse the repository at this point in the history
Enable ZMQ on gnmi and orchagent

#### Why I did it
Improve GNMI API performance for Dash resources

#### How I did it
Modify gnmi and orchagent service start script, add ZMQ parameter.

#### How to verify it
Pass all UT & E2E test
Manually verify with create Dash resources via gnmi API.
  • Loading branch information
liuh-80 authored Oct 9, 2023
1 parent 875a6d9 commit 6e32600
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ else
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
fi

# Enable ZMQ for SmartSwitch
LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget localhost "subtype"`
if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then
ORCHAGENT_ARGS+=" -q tcp://127.0.0.1:8100"
fi

exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
6 changes: 6 additions & 0 deletions dockers/docker-sonic-telemetry/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ else
TELEMETRY_ARGS+=" -v=2"
fi

# Enable ZMQ for SmartSwitch
LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget localhost "subtype"`
if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then
TELEMETRY_ARGS+=" -zmq_address=tcp://127.0.0.1:8100"
fi

# Server will handle threshold connections consecutively
THRESHOLD_CONNECTIONS=$(echo $GNMI | jq -r '.threshold')
if [[ $THRESHOLD_CONNECTIONS =~ ^[0-9]+$ ]]; then
Expand Down

0 comments on commit 6e32600

Please sign in to comment.