是否可以直接访问REDIS共享内存(而无需浏览插座)?

发布于 2025-01-30 09:56:24 字数 257 浏览 5 评论 0原文

我们有一个非常延迟敏感的Web服务应用程序,我们正在考虑将REDIS用于我们的用例中,在此情况下,每个Web服务器节点将在本地安装REDIS,这些Web服务器节点(每个已安装了REDIS)将相互同步REDIS数据。

根据文档,似乎可以通过TCP端口访问REDIS。我们想知道我们的Web服务器进程是否有可能直接访问本地REDIS实例的共享内存(使用指针?),而不必通过那些TCP套接字?

如果redis不是正确的工具,您还有其他建议的工具吗?

谢谢, 杰西卡

We have a very latency sensitive web service application and we're thinking of using Redis for our use case where each web server node will have Redis installed locally and these web server nodes(each with Redis installed) will sync Redis data with each other.

Based on the documentation, it seems that Redis is accessed through TCP ports. We're wondering if it's possible for our web server process to directly access our local Redis instance's shared memory(using pointers?) instead of having to go through those TCP sockets?

If Redis is not the right tool, is there any other tool that you'd suggest?

Thanks,
Jessica

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

天生の放荡 2025-02-06 09:56:24

不,你不能。

但是,您可以在TCP和UNIX域插座上聆听Redis。 TCP连接可用于将数据与其他REDIS实例同步。您可以使用UNIX域套接字连接到本地REDIS服务器。 UNIX域插座可能比TCP连接快。

我没有使用这种配置来测试Redis,尽管我认为值得一试。您最好使用一些基准。祝你好运!

No, you cannot.

However, you can make Redis listen on both TCP and Unix Domain Socket. TCP connection can be used for syncing data with other Redis instances. And you can connect to local Redis server with Unix Domain Socket. Unix Domain Socket might be faster than TCP connection.

I did not test Redis with this configuration, although I think it worth a try. You'd better do some benchmark with. Good luck!

治碍 2025-02-06 09:56:24

许多人使用RDMA和DPDK来减少sentive senario等网络I/O等网络的延迟,如对冲基金,在DPDK上进行了许多工作,但REDIS(尽管它仍在通过TCP/IP),但在DPDK中,我们收到了数据。根据其他人所做的基准,从用户空间直接从用户空间可以显着降低网络io的延迟,它可以提高单个REDIS实例的许可,占30%至60%。

many people use RDMA and DPDK to reduce the latency of network i/o in sentitive senario like hedge fund, there are lots of works had been done on dpdk with Redis ( though it's still through tcp/ip), in dpdk we receive the data from user space directly so the latency of network io can be decrease significantly, according to the benchmark done by others , it can improve the permance of single redis instance for 30% to 60%.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文