Docker Community Forums

Share and learn in the Docker community.

Reduce networking overhead for a redis container

I am running redis on a Linux container on my Windows machine through Docker Desktop (WSL2/Ubuntu20 backend). This redis server is then accessed from an app running on my machine outside docker by exposing its ports.
Unfortunately, the networking overhead introduced by WSL2 + docker makes “a lot” slower. Respectively 2 times slower if redis is running directly on WSL2 and 8x if it’s running in a container in WSL2.
Are you aware of any technique by which I could reduce this time, at least bring it closer to WSL2 performances. I tried running the container with --net=host, unfortunately the daemon is already running in an isolated network so it does not fix my problem.