redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to force rueidis client to only use 1 outgoing source port only?

ouvaa opened this issue · comments

i did PipelineMultiplex = 0 but it's not working:

    client, err := rueidis.NewClient(rueidis.ClientOption{
        InitAddress: []string{"localhost:6379"},
        DisableCache: true, // Disable the internal command cache
        PipelineMultiplex: 0,
    })
1711175984.285994 [0 127.0.0.1:40814] "SET" "key3_9446" "value3_9446"
1711175984.286018 [0 127.0.0.1:40806] "GET" "key5_9863"
1711175984.286019 [0 127.0.0.1:40806] "GET" "key4_9629"
1711175984.286022 [0 127.0.0.1:40814] "GET" "key6_9157"
1711175984.286044 [0 127.0.0.1:40814] "GET" "key3_9446"
1711175984.286048 [0 127.0.0.1:40796] "GET" "key1_8839"
1711175984.286050 [0 127.0.0.1:40796] "GET" "key8_9579"
1711175984.286069 [0 127.0.0.1:40814] "SET" "key11_9866" "value11_9866"
1711175984.286073 [0 127.0.0.1:40796] "SET" "key0_8733" "value0_8733"
1711175984.286079 [0 127.0.0.1:40790] "SET" "key7_9680" "value7_9680"
1711175984.286080 [0 127.0.0.1:40790] "GET" "key9_9531"

Hi @ouvaa, try PipelineMultiplex: -1

@rueian this makes it faster than all other options?! seems rueidis is not "multi core" aware... in my next question.