dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.88k stars 947 forks source link

unix domain sockets connection possible? #93

Closed osevan closed 2 years ago

osevan commented 2 years ago

It is possible to use unix domain sockets and Ipv4 listening on same time?

Thanks and

Best regards

romange commented 2 years ago

I did not understand the question. Do you want to use both UDS and TCP port simultaneously?

osevan commented 2 years ago

I did not understand the question. Do you want to use both UDS and TCP port simultaneously?

Yes, because in Keydb it is possible via config.

I can listen on localhost and unix sockets

romange commented 2 years ago

Yes, it's technically possible to implement. Why do you need this feature? In what cases you would want to connect to UDS if you already have TCP

osevan commented 2 years ago

Yes, it's technically possible to implement. Why do you need this feature? In what cases you would want to connect to UDS if you already have TCP

For example ,when i run keydb and client on single machine and I want avoid IP layer overhead.

On my lab I get 450k get with localhost listening

And 600k get requests when I listen in unix:///tmp/keydb.sock

And on production server the same , unix domain sockets was fastest for me and im using as default connection method, but fall back to localhost, when some connectors need it.

romange commented 2 years ago

how about DF? do you get better performance with DF over sockets than keydb with UDS?

romange commented 2 years ago

@osevan ? would love to hear your feedback.

osevan commented 2 years ago

how about DF? do you get better performance with DF over sockets than keydb with UDS?

At the moment im writing bashscript for automaticaly install webserver with tuning settings - at the moment 1200 lines bashcode only for nginx.

After than ,I want try DF with compiler tuning and see what i get back and post here

osevan commented 2 years ago

how about DF? do you get better performance with DF over sockets than keydb with UDS?

Btw, it is possible to connect at current release over unix sockets already?

romange commented 2 years ago

Nope, it's not something I am planning to do any time soon. Also, I am skeptical you get any substantial advantage from tuning compiler flags: most of the CPU is spent in kernel anyway and is not affected by the app.

romange commented 2 years ago

duplicate of #206