Multiple C++ stateless processes - single redis master instance - data syncronization

23 views
Skip to first unread message

Iranjeet Singh

unread,
Jul 15, 2016, 8:23:06 AM7/15/16
to Redis DB
I have a C++ program whose name is say "Manager" .

This is a stateless process, so multiple instances of it can be run on single machine or different machines.

"Manager" binary manipulates some data in Redis i.e apply some operations on Redis keys.

If the two "Manager" instances  read/writes the same key, the results will be not as expected and discrepancy would be there. 

I want to assure, that the same Redis key is manipulated in a synchronized way by  "Manager" instances.

Thanks.

The Real Bill

unread,
Jul 16, 2016, 1:53:23 AM7/16/16
to Redis DB
Redid is single-threaded so its operations are atomic. Thus if two processes try to write to the same key they will line up and last write wins.
Reply all
Reply to author
Forward
0 new messages