News for hackers. Stuff that matters.
Re:Call me maybe: Aerospike by obituary_latte on Tuesday May 05, 2015 @07:29PM (#9495654)
Can you add any detail to this anecdote? It's interesting and important, but detail might help steer others appropriately. What kind of inconsistency? What kind of fluctuation?
Re:Call me maybe: Aerospike by Ankhers on Tuesday May 05, 2015 @07:49PM (#9495744)
I'm current working in AdTech. We are using counters to keep track of a lot of things that are important to us (e.g., reasons for not bidding on a given campaign, money spent within a given transaction, number of bid requests we get by exchange, etc). I personally have found two different, yet very similar, data fluctuations.

The first I found when debugging an issue. I noticed the counters going up, dip down, then continuing up. Rinse repeat. (e.g., 158 -> 160 -> 158 -> 170 -> 175 -> 173 -> 180)

The second I found was when trying to debugging the previous issue. I noticed the counters were essentially cycling. (e.g., 158 -> 160 -> 170 -> 158 -> 160 -> 170). This just repeated for the duration we watched the counters (approximately five minutes).

Please note that I used small numbers here. The counters I was monitoring were in the hundred millions, and I saw decrements in average between 2-3k.

Re:Call me maybe: Aerospike by justinsb on Tuesday May 05, 2015 @08:13PM (#9495845)
Isn't this exactly what the article found? (search for split-brain)
Re:Call me maybe: Aerospike by linc01n on Wednesday May 06, 2015 @02:59AM (#9496976)
I work in AdTech too. I'm still looking for a perfect counter solution. The counter we are using always overrun (which is better than up/down/up/down). We still manage to hack it by patching the number periodically.

p.s. I am working in an Ad Network but not plugging into exchange. Our system is not capable for that.

Re:Call me maybe: Aerospike by annnnd on Wednesday May 06, 2015 @05:59AM (#9497551)
Genuinly curious: did you try implementing realtime stream processing solution, using Storm or similar?
Re:Call me maybe: Aerospike by jhugg on Wednesday May 06, 2015 @03:14PM (#9501110)
VoltDB is pretty fantastic at counters. (VoltDB Engineer)
Re:Call me maybe: Aerospike by Rapzid on Tuesday May 05, 2015 @10:38PM (#9496306)
Some of this stuff looks to me, as somebody not familiar with the domain of course, as a really good use case for event sourcing and in particular something Kafka/Samza could tackle well.

For future consideration and delayed evaluation of course. I guess if you absolutely must have the most up-to-date information so you can make decisions on it RIGHT NOW that wouldn't work very well :|

Or would it? If your bids and stuff are also going through the event stream..

Re:Call me maybe: Aerospike by SystemOut on Wednesday May 06, 2015 @12:22AM (#9496574)
Bids generally have to be responded to within 100ms on these AdTech stacks and if you start to timeout they slow down bids being sent to you....which makes your bid manager less desirable by advertisers. You can probably use stream processing to build and update your models but I'd be surprised if you could handle the bid responses through the same mechanism.
Re:Call me maybe: Aerospike by 23david on Tuesday May 05, 2015 @08:00PM (#9495791)
Very strange. I've never encountered something like that with any database or cache. Wonder if it's somehow related to the way that your cluster is setup?

How big is this cluster? Are you writing and reading to the entire cluster, or do you have certain nodes that you write to and others that you read from?

Re:Call me maybe: Aerospike by bbq on Tuesday May 05, 2015 @08:46PM (#9495964)
The analysis in the article shows that Aerospike is designed, intentionally or not, as a loosely accurate data store. It doesn't matter how you set it up or use it.
Re:Call me maybe: Aerospike by jamshid on Tuesday May 05, 2015 @09:13PM (#9496045)
You use distributed databases and have never encountered an inconsistency? What scale? What are you using, I guess not any of these: https://aphyr.com/tags/jepsen.
Re:Call me maybe: Aerospike by Ankhers on Tuesday May 05, 2015 @08:15PM (#9495861)
I have to admit, I'm not 100% on the entire configuration. However...

We have two clusters of 8 nodes each. Each cluster is setup with 2 factor replication. The clusters are setup with cross datacenter replication.

Your read / write question is a little hard to answer. In Aerospike, a given key will always reside on the same node, something to do with how they optimize their storage. Which means that anytime you write to, or read from, a given key your query will always be routed to the same node.

Re:Call me maybe: Aerospike by ngx1234 on Tuesday May 05, 2015 @10:33PM (#9496292)
When Aerospike ships XDR batches it does not replay events, it just re-syncs the data. This is true even for increments. So if cluster A has 10 increments of n to n+10, and cluster B has 20 increments of n to n+20, it's possible XDR will ship A to B and cluster B gets set to n+10. XDR only guarantees data consistency if writes are 15 mins apart and your cross datacenter network doesn't go down.

The suggested method of solving this is to have two keys, one for each cluster, and XDR both keys. Then add them together in the app. You can maybe do it through a lua script, though I haven't tried.