4 ms·
It's possible to use stacks to 'cache' writes in scenarios like this. Writes to the same object go in the same stack, iterate over stacks, pop the first item,
by fleitz 10y ago
It's possible to use stacks to 'cache' writes in scenarios like this.
Writes to the same object go in the same stack, iterate over stacks, pop the first item, write it, clear the stack.
It works miracles for ephemeral data like wikipedia edits.
If you have extremely spikey load on servers, stacks are also a great replacement for queues, admit that during the deluge some portion of queries will timeout and go unanswered, instead of trying to process queries that are likely to timeout, simply process the first query on the stack and don't waste time processing the ones bound to fail.
- chris_wot 10y agoDoesn't caching writes from multiple different servers potentially cause consistency and durability concerns? I know MongoDB still haven't marked the bug [1] reported by Kyle Kingsbury [2] that found stale reads on all consistency and write concern levels... 1. https://jira.mongodb.org/plugins/servlet/mobile#issue/SERVER-17975 https://jira.mongodb.org/plugins/servlet/mobile#issue/SERVER... 2. https://aphyr.com/posts/322-jepsen-mongodb-stale-reads https://aphyr.com/posts/322-jepsen-mongodb-stale-reads