Java - Redis:300 池连接可能吗?

发布于 2024-11-14 17:46:53 字数 92 浏览 6 评论 0原文

我发现在 Redis 中创建一个具有 300 多个连接的连接池很困难。我打算在多线程应用程序的不稳定环境中使用它。有没有人有这样的部署经验可以帮助我确定这是否可行?谢谢。

I find it hard to create a connection pool in Redis with 300+ connections. I am about use it in a volatile environment in a multi-threaded app. Is anyone experienced with a deployment like this that could help me determine if this is possible? Thanks.

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

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

发布评论

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

评论(1

堇年纸鸢 2024-11-21 17:46:53

Redis 端不应该有任何问题 - http://jaksprats.wordpress。 com/2010/09/22/12/ 显示最多 64k 并发连接的性能数据。

300 距离 64k 还很远,但它更接近 java 可以合理处理的最大线程数。这取决于您使用的硬件、JVM 设置以及每个线程的执行量。您的问题中没有足够的信息来确定,但这很可能就是您遇到问题的地方。

You shouldn't have any issues on the redis side - http://jaksprats.wordpress.com/2010/09/22/12/ shows performance data for up to 64k concurrent connections.

300 is a long way from 64k, but it is a lot closer to the maximum number of threads java can reasonably handle. That varies depending on the hardware you are using, JVM settings, and how much each thread is doing. There isn't enough information in your question to know for sure, but most likely this is where you are running into problems.

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