Replication and re-sharding of keys

23 views
Skip to first unread message

Simone Mosciatti

unread,
Dec 17, 2016, 4:28:41 PM12/17/16
to redis-module-devs
Hi all,

I have a doubts about what happens in case of replication.

I haven't understood the semantic start/stop/step of RM_CreateCommand, that believe it is related to replication but I am not sure at all.

Also, suppose I am able to distribute my values on a redis cluster, what happens in case of re-sharding (a node, enter/leave the cluster and some key must move) ?
What function is called in order to move a custom key from one node to another?

Cheers,

Simone

Dvir Volk

unread,
Dec 18, 2016, 5:01:25 AM12/18/16
to Simone Mosciatti, redis-module-devs
If you create a custom data type, you should provide serialization and de-serialization callbacks for RDB. They are also used for migrating keys. In your case this probably means a full dump or load of the entire sqlite database. 

Re replication - you should use command based replication in your case, using RedisModule_Replicate or RedisModule_ReplicateVerbatim. 

--
You received this message because you are subscribed to the Google Groups "redis-module-devs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-module-d...@googlegroups.com.
To post to this group, send email to redis-mo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-module-devs/62f0a4af-7261-4e71-b007-75d6b36db3ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simone Mosciatti

unread,
Dec 19, 2016, 9:34:22 AM12/19/16
to Dvir Volk, redis-module-devs
Hi Dvir,

Thanks, it completely makes sense and it's perfectly reasonable.

Thank you again :)

Cheers

Simone

Da: Dvir Volk
Inviato: ‎18/‎12/‎2016 11:01
A: Simone Mosciatti; redis-module-devs
Oggetto: Re: Replication and re-sharding of keys

Reply all
Reply to author
Forward
0 new messages