Hi Corey, From: Corey Nolet <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Friday, March 7, 2014 6:44 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: locality in underlying memcached
Hello, I've got a unique use-case where I want to use memcached as a backing cache behind Twitter Storm so that I can place keys and values and have Couchbase index them in views as well as ElasticSearch so that users can query on the data that's being populated from Storm. Storm has a unique feature that will allow me to guarantee that the same item i'm processing will always be sent to the same node/processor. For instance, if i have documents with keys "A, B, and C" and I have 3 nodes running the same storm topology, I can guarantee that A gets put on the same node, B gets put on the same node, and C gets put on the same node. From what I've read, If I use the MemcachedClient in the couchbase java client API instead of the couchbase client and have each of my storm nodes only talk to their localhost memcached clien, I should be able to guarantee that the keys/values stay on that local node, correct? It's important for me as well because I'm manipulating these keys and values quite frequently. Are there any gotchas I should be aware of when considering this approach? Unfortunately, that's not correct. While you can use spymemcached to talk to localhost, moxi will forward it to the node responsible for that given key in the current topology. Why are you looking to keep it local? In most cases, that'll only save milliseconds of latency, if they're small objects. I think if you want to ensure it's always on the local host, then the best thing to do is to have a single-node cluster on each host. This wouldn't have the high availability that you'd get out of clustering, but it would keep things local. Moxy will not automatically balance out these keys and put them on foreign nodes as long as my topology doesn't change, correct? If nodes are ever added, both Couchbase and Storm will also be added. Thanks! Hope that helps, Matt -- Matt Ingenthron Couchbase, Inc. -- You received this message because you are subscribed to the Google Groups "Couchbase" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
