redis perfermance discussion in gg group

本文讨论了在高并发场景下使用Redis时连接池的重要性及其实现方式。对于较低的并发数,推荐使用JRedisService来维护连接池;对于极高并发需求,则建议采用Pipeline配合sync()语义的方式,以单连接实现更高的吞吐量。
http://groups.google.com/group/redis-db/browse_thread/thread/1adb93f0b6a1460a

In JRedis you have two options if you are using a front-end that
serves a lot of concurrent processes.
For low (concurrent) number of processes (threads), you can use
JRedisService. This connector maintains a pool of connections to
Redis and cycles through next available connection to serve service
requests.
For very high (concurrent) number of processes (thread count in the
thousands) -- specially if you will be maintaining a constant load on
the connector -- use the Pipeline with sync() semantics. Pipeline
uses a single connection, but has much higher throughput.
/R
On Nov 22, 9:30 am, Alex <alexgen...@gmail.com> wrote:

- 隐藏被引用文字 -
> And what if there are a huge number of clients? Will a 100 or 1000
> persistant connections be a problem? Is there any upper (performance)
> limit (32 bit port number)?
> On 22 Nov., 15:14, Sergey Shepelev <temo...@gmail.com> wrote:
> > On Sun, Nov 22, 2009 at 4:02 PM, wqhhust <staywith...@gmail.com> wrote:
> > > Does redis support connection pool? Currently we are using 2,000+ java
> > > application servers to connect to mysql (memory engine), and
> > > connection pool is used. If switch mysql to redis, without connection
> > > pool, it can't handle so many connect/disconnect.
> > Redis supports peristant (keepalive) connections.
> > Your favourite or your own Redis client library may implement a connection pool.
> > But the best way would be to actually have one connection per
> > application life. A pool of 1 connection.
> > In Java it may be implemented as a static class with synchronized
> > executeCommand() method. It tries to send command to your Redis
> > server, if that fails for network reasons, it reconnects and tries
> > again. That covers initial (not connected yet) case too.
> > > --
> > > You received this message because you are subscribed to the Google Groups "Redis DB" group.
> > > To post to this group, send email to redis-db@googlegroups.com.
> > > To unsubscribe from this group, send email to redis-db+unsubscribe@googlegroups.com.
> > > For more options, visit this group athttp://groups.google.com/group/redis-db?hl=.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值