F****n 发帖数: 3271 | 1 比如以前有人提到过的订票系统,假设一张票一个记录数量为100个,如果有1000个访
问订票对这个记录会产生大量write lock request, 让系统变慢。一个解决办法是把这
个记录分成多个放在不同的分区,但这个显然麻烦而且不太clean,不知道现在有啥
best practice? |
g*****g 发帖数: 34805 | 2 Distributed counter is one choice. But it may not meet high ACID requirement
when you need to write other data to DB in one transaction.
Async process is another. Google checkout will not tell you at the spot wh
ether a purchase is successful on high demand, it will send you an email
later
instead.
【在 F****n 的大作中提到】 : 比如以前有人提到过的订票系统,假设一张票一个记录数量为100个,如果有1000个访 : 问订票对这个记录会产生大量write lock request, 让系统变慢。一个解决办法是把这 : 个记录分成多个放在不同的分区,但这个显然麻烦而且不太clean,不知道现在有啥 : best practice?
|
F****n 发帖数: 3271 | 3 Thanks.
Distributed counter is similar to what we are doing.
Does Cassandra has transparent support for distributed counters,
i.e., can it declare a column as "counter" type and then increment/decrement
of that column can utilize a distributed counter?
requirement
【在 g*****g 的大作中提到】 : Distributed counter is one choice. But it may not meet high ACID requirement : when you need to write other data to DB in one transaction. : Async process is another. Google checkout will not tell you at the spot wh : ether a purchase is successful on high demand, it will send you an email : later : instead.
|
g*****g 发帖数: 34805 | 4 That's correct. Keep in mind due to its nature, the counter isn't always
accurate. If your app is very sensitive on that, don't use it.
decrement
【在 F****n 的大作中提到】 : Thanks. : Distributed counter is similar to what we are doing. : Does Cassandra has transparent support for distributed counters, : i.e., can it declare a column as "counter" type and then increment/decrement : of that column can utilize a distributed counter? : : requirement
|
w**z 发帖数: 8232 | 5 Cassandra counter has a lot of issues. it claims that it is fixed in 2.0.x,
research it before using it.
decrement
【在 F****n 的大作中提到】 : Thanks. : Distributed counter is similar to what we are doing. : Does Cassandra has transparent support for distributed counters, : i.e., can it declare a column as "counter" type and then increment/decrement : of that column can utilize a distributed counter? : : requirement
|