Java - Redis:300 池连接可能吗?
我发现在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.