You probably could, but if I were you, I'd consider a tool built for that purpose, such as Zookeeper. It'd open up access to a lot of other great cluster coordination features.
On Thu, Oct 15, 2015 at 8:47 AM Jan Algermissen <algermissen1...@icloud.com> wrote: > Hi, > > suppose I have two data centers and want to coordinate a bunch of services > in each data center (for example to load data into a per-DC system that is > not DC-aware (Solr)). > > Does it make sense to use CAS functionality with explicit LOCAL_SERIAL to > 'elect' a leader per data center to do the work? > > So instead of saying 'for this query, LOCAL_SERIAL is enough for me' this > would be like saying 'I want XYZ to happen exactly once, per data center'. > - All services would try to do XYZ, but only one instance *per datacenter* > will actually become the leader and succeed. > > Makes sense? > > Jan >