sonic-net / sonic-swss

SONiC Switch State Service (SwSS)
https://azure.github.io/SONiC
Other
170 stars 503 forks source link

[buffermgrd] Use unix socket for redis connection #3190

Closed Junchao-Mellanox closed 2 months ago

Junchao-Mellanox commented 2 months ago

Why I did this?

Most of the DB connection in buffermgrd is using unix socket. There is only one DB connection which is using TCP socket. It brings a few drawback:

  1. TCP socket is less efficiency
  2. TCP socket may fail if loopback interface is down. It could cause following error:
    Apr 29 16:53:25.586513 sonic ERR swss#buffermgrd: :- main: Runtime error: Unable to connect to redis: Cannot assign requested address

How I did this

Change TCP socket to unix socket

How I verify this

Manual test

Junchao-Mellanox commented 2 months ago

Hi @prsunny , could you please kindly review this?

Junchao-Mellanox commented 2 months ago

Hi @prsunny , could you please review and sign-off?

mssonicbld commented 1 month ago

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-swss/pull/3202

mssonicbld commented 2 weeks ago

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-swss/pull/3249