Delay read is acceptable, but problem still there: A request come to node One at local time PM 10:00:01.000 B request come to node Two at local time PM 10:00:00.980
The correct order is A --> B I am not sure how node C will handle the data, although A came before B, but B's timestamp is earlier then A ? 2013/1/17 Russell Haering <russellhaer...@gmail.com> > One solution is to only read up to (now - 1 second). If this is a public > API where you want to guarantee full consistency (ie, if you have added a > message to the queue, it will definitely appear to be there) you can > instead delay requests for 1 second before reading up to the moment that > the request was received. > > In either of these approaches you can tune the time offset based on how > closely synchronized you believe you can keep your clocks. The tradeoff of > course, will be increased latency. > > > On Wed, Jan 16, 2013 at 5:56 PM, Jason Tang <ares.t...@gmail.com> wrote: > >> Hi >> >> I am using Cassandra in a message bus solution, the major responsibility >> of cassandra is recording the incoming requests for later consumming. >> >> One strategy is First in First out (FIFO), so I need to get the stored >> request in reversed order. >> >> I use NTP to synchronize the system time for the nodes in the cluster. (4 >> nodes). >> >> But the local time of each node are still have some inaccuracy, around 40 >> ms. >> >> The consistency level is write all and read one, and replicate factor is >> 3. >> >> But here is the problem: >> A request come to node One at local time PM 10:00:01.000 >> B request come to node Two at local time PM 10:00:00.980 >> >> The correct order is A --> B >> But the timestamp is B --> A >> >> So is there any way for Cassandra to keep the correct order for read >> operation? (e.g. logical timestamp ?) >> >> Or Cassandra strong depence on time synchronization solution? >> >> BRs >> //Tang >> >> >> >> >> >