I have a multi datacenter(DC1, DC2) environment having 3 nodes in each datacenter with RF=3 per datacenter.
Wanted to know if triggers can be used in production in a multi-datacenter environment. If so, how can this be achieved?
Case A: If I start inserting the data to DC1, it would have 3 replicas with in DC1 and is responsible of replicating the data to other data center DC2. Every time an insert into DC2 takes place, I would like to have an trigger event to occur and notify about the latest inserted value in the application. Is it possible?
Case B: If not point 2, is it good to insert the data simultaneously on to two datacenters DC1, DC2 (pointing to a single table) and avoid triggers concept? Will it have any impact with the network traffic? Based on the latest timestamp, the table would have the last insert to the table which serves the purpose when queried from either of the regions.
Consistency level as LOCAL_QUORUM for Read Consistency level as ONE for write dse 4.8.2
With these Consistency levels, good consistency can be achieved lowering the latency for write operation across the datacenters.
Usecase:
We have an application (2 domains) for two different regions(DC1 & DC2). Users of DC1 region uses domain 1 to access the application and users of DC2 region uses domain 2 for the same. The data is ingested to DC1 for the same region and when this replicates in its DC, the coordinator of DC1 would replicate the data in other DC (DC2). The moment Dc2 receives the data from DC1, we want to let the application know about the latest information (Polling_ available using some trigger event mechanism. Just wanted to know if this can be implemented with cassandra triggers.
Can someone give the feedback on Case A and Case B? and which would be efficient in production. Thanks