Results 1 to 4 of 4

Thread: How to connect to multiple Redis instances using RedisTemplate

  1. #1
    Join Date
    Mar 2009
    Posts
    16

    Default How to connect to multiple Redis instances using RedisTemplate

    Hi,

    I have a few questions:

    1. If I setup 2 Redis servers with sharding, how do I instruct the client using RedisTemplate to connect to both of them?
    2. Does Jedis have the knowladge of the sharing (i.e. to know to which server it should go to get the data?)

    Thanks,

    Yair

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Currently, there's no dedicated support for sharding in Spring Redis. We'll probably look into it for 1.1. These being said, most "drivers" should handle this automatically based on your configuration - however take this with a grain of salt as I haven't looked too closely into it.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    Mar 2009
    Posts
    16

    Default

    I see that Jedis itself does support a list of ShardInfo objects. I see no other choice other than using it directly?

    What do you mean by "drivers" the spring factory only allows a single host-port pair, right?

    When is version 1.1 planned?

    Thanks,

    Yair

  4. #4
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    By drivers I mean Jedis, Jredis, RJC and so on. The host/port pair can be either a direct connection or maybe a list of shards. It seems the former is the case, even with the drivers.
    If I recall correctly, there is work underway to improve this in Redis itself so the entire sharding process can be dealt with on the redis instance rather then client - however I don't know the specific details.
    1.1 is planned for later this year - we'll have first to reach 1.0 before committing to an actual date.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •