Idle connections in redis

220 views
Skip to first unread message

Dbz Fan

unread,
May 6, 2015, 8:04:19 AM5/6/15
to redi...@googlegroups.com
I tried establishing 6 connections to redis(by starting 6 threas from ) and was periodically firing "INFO" command , I observed the no. of clients was not constant although it was  always less than 9 (2sentinel client , one client was redis-cli so the remaning were normal clients) (same was shown with "client list" command) .

I was trying to maintain a constant throughput of around 40 request per second , Is it possible that redis was  to achieve this throughput wih a fewer number of connections so therefore other connections were not shown in "INFO" and "client list" commands.

I checked redis logs it does not report any client disconnection. Also timeout is set to 0 in redis.conf

Itamar Haber

unread,
May 6, 2015, 8:10:07 AM5/6/15
to redi...@googlegroups.com
The use of threads in your application does not, alas, guarantee a dedicated connection per thread - that depends on your code (is each thread using one and only one connection?) and the Redis client that you're using (is it thread-safe? are you using it correctly? are there any connection pools involved?  is your client "thin" and exposes the standard API or is it something more elaborate that "thinks"?). You can have more, less or exactly 6 client connections depending on these.

In terms of throughput, that also depends on many factors, but 40 RPS should be easily doable even by the tiniest and weakest Redis instance.

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.



--

Itamar Haber | Chief Developers Advocate
Redis Watch Newsletter - Curator and Janitor
Redis Labs - Enterprise-Class Redis for Developers

Mobile: +1 (415) 688 2443
Mobile (IL): +972 (54) 567 9692
Email: ita...@redislabs.com
Skype: itamar.haber

Blog  |  Twitter  |  LinkedIn


Dbz Fan

unread,
May 6, 2015, 8:29:13 AM5/6/15
to redi...@googlegroups.com
So does that mean redis itself is not in any way responsible for change in no. of clients?
Reply all
Reply to author
Forward
0 new messages