What is LOCAL_SERIAL in cassandra?

Viewed 1080

I have been intending to model a Bank application database and want to make sure, the database remain consistent at every node. Came across LOCAL_QUORUM and LOCAL_SERIAL, when can we use it? I know LOCAL_QUORUM (n/2+1) consistency is required, what about LOCAL_SERIAL.

1 Answers

LOCAL_SERIAL and SERIAL are used for so-called lightweight transactions (LWTs), when replicas need to coordinate between them before applying the change. SERIAL requires all replicas in all data centers to coordinate, and LOCAL_SERIAL - only replicas in the local data center.

But you should be very careful with LWTs - they should be applied in very limited number of cases, as they could significantly impact performance.

Related