php - Predis: Pros and Cons of the two cluster strategies -


i using predis connect redis 3.0.2 cluster. so, have option use either predis or redis cluster strategy. wondering if there significant pros , cons of choosing 1 of them on other?

based on wandering through documentation, have these couple of points in mind, not sure if understanding correct:

  1. when using redis strategy, don't have list every node of our cluster while establishing connection. reference (possibly pro :) )

    when using redis-cluster, not necessary pass of nodes compose cluster can specify few nodes

  2. next line of article linked above says:

    predis automatically fetch full , updated slots map directly redis contacting 1 of servers.

could con in terms of performance? because predis need fetch data server before deciding node select current read/write operation?

context:

we planning use redis store php sessions. ajax heavy web application thousands of active users @ peak times. that's why want spread load across multiple redis nodes. happy manually maintain list of server addresses in connection establishment code in order use predis strategy if expected offer better performance compared redis strategy specific use case.

iiuc you're debating internally between using predis' client-side sharding vs. having leverage redis v3's clustering abilities.

client-side sharding great have clustering when database doesn't support , approach easiest implement initially. however, when database provide native clustering functionality - case redis v3 - you'd better off using that.

in terms of performance, i'm not sure whether there's significant difference between approaches. redis partitioning discussed @ http://redis.io/topics/partitioning


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -