19 ms·
Call me maybe: Elasticsearch
- syntern 12y agoTL;DR: "Some people actually advocate using Elasticsearch as a primary data store; I think this is somewhat less than advisable at present." "The good news is that Elasticsearch is a search engine, and you can often afford the loss of search results for a while." My personal favorite solution would reliably channel data from a Riak cluster to an ES cluster. Anyone knows if there is something like that out there?
- technoweenie 12y agoRiak Search will do this for you. The Riak key/value store also has post-commit hooks that you can use: http://docs.basho.com/riak/1.2.1/references/appendices/concepts/Commit-Hooks/ http://docs.basho.com/riak/1.2.1/references/appendices/conce...
- macintux 12y agoBasho is implementing a much better search option based on distributed Solr (instead of relying on something in-house), due out this year with the 2.0 release. It's available for testing today. (Full disclaimer: I work for Basho.)
- rch 12y agoI'm building an internal geospatial product on the beta, anticipating the release. Great results so far.
- eredmond 12y ago"Based on distributed Solr" might be an over simplification. It uses Solr as its indexing engine, but really, that engine could be any single-node indexer... including single ES nodes. Basically, Yokozuna adds real grownup distributed systems computer science to the OSS distributed search space. http://docs.basho.com/riak/2.0.0beta1/dev/advanced/search/ http://docs.basho.com/riak/2.0.0beta1/dev/advanced/search/
- lobster_johnson 12y agoTo me, the Yokozuna "mediator" seems highly specific to Solr. It's not like you could swap out Solr for ES with just a little glue code, I think?
- syntern 12y agoI have briefly checked the Riak yokozuna project, and it really looks great. Nevertheless, I'd prefer to have the data storage cluster and the search cluster to be separated (and I really like ElasticSearch too). Edit: I shall add that the most interesting search problems are the ones where you need to join separate data sources, and in such cases it is not really the question of what kind of search solution you are using, rather what kind of async queue and data update you have. So the separated cluster is really about having a distributed queue between the 'data-master' and the 'search-master'.
- rch 12y agoHow about Riak CS for storage, separate from the search cluster?
- syntern 12y agoI am not sure what difference it makes to have Riak or Riak CS for data storage, in the context of having a separate search cluster. Would you elaborate?
- rch 12y agoYokozuna and CS (or plain Riak) use different backend configurations[0,1]. So beyond having physically distinct clusters, you'd get to have purpose optimized storage, but with a common management regime. [0] http://docs.basho.com/riak/latest/ops/building/planning/backends/ http://docs.basho.com/riak/latest/ops/building/planning/back... [1] http://docs.basho.com/riakcs/latest/cookbooks/configuration/Configuring-Riak/ http://docs.basho.com/riakcs/latest/cookbooks/configuration/...
- kansface 12y agoBefore you do that, check out http://aphyr.com/posts/285-call-me-maybe-riak http://aphyr.com/posts/285-call-me-maybe-riak
- aaronblohowiak 12y agoTL;DR: Aphyr talks at length about how riak is not a CP system, even though nobody claims that it is. Riak is AP. Aphyr demonstrates how this plays out in practice and gives an intro into CRDTs, which let you achieve something that is eventually correct for certain kinds of state transformations.
- nosequel 12y agoEvery conclusion he comes to are also described on Basho's site when it comes to using last-write-wins. At the end of the post, notice CRDT's preserve 100% of writes, and the same could be had if allowing siblings. Punting on high-availability is different than the company being upfront about the tradeoffs.
- rdtsc 12y agoWhat do you mean? Are you saying it because Riak with sibling preservation is actually one of the few (if not the only) database that didn't drop writes.
- rspeer 12y agoSo, what do you do with siblings in a searchable text index (the case that ElasticSearch is designed for)?
- zsiddique 12y agoFunny, the link for "using Elasticsearch" points to an interview I gave ;) He raises some good points on ES current problems with master election, I have raised it with the ES team during meetup with them and we have a work around the issue (we discovered the bug during our testing). Its important to know the soft points of the system your using and how to work around it. We feel like we have a good workaround and I think that has been the point of his series is to point out the flaws in common tools and you should be read to work around them. But he found a single flaw and attacked it hard, so, I am not sure throwing away the whole thing for a single flaw is a great recommendation.
- jasonkolb 12y agoWould you mind sharing your workaround?
- mstump 12y agoDataStax Enterprise integrates Solr with Cassandra. The Solr docs are stored in Cassandra. Solr and Cassandra occupy the same JVM. As a result all docs inserted into C* are indexed using Solr, and Solr get's the high availability/linear scalability of Cassandra. I successfully deployed it as a customer, and I know of several clusters in the many hundreds of nodes.
- Torn 12y agoFrom the article comments: > seems like the ES team is moving in the right direction with testing this stuff https://github.com/elasticsearch/elasticsearch/commit/ef759322231b21aa3c8b160f86b895483cff1ebf https://github.com/elasticsearch/elasticsearch/commit/ef7593...
- AznHisoka 12y agoThese problems are a major reason why I decided to not go with the typical 1 cluster-multiple replica infrastructure. Instead I have multiple clusters, 0 replicas, and load balance against those clusters. No split brain problem, but the same data availability benefits as having replicas. Granted, the logic is all in my app now. Now when a cluster is down, I have retry logic to keep reindexing that data to that cluster until it succeeds.
- keypusher 12y agoSplit brain problems are not related to having a replica, it can happen when any nodes in the cluster cannot talk to each other, and therefore opens the possibility of multiple masters. Having multiple clusters just means you can have multiple things in split brain, unless you have protection within your clustering stack against this outcome.
- gibrown 12y agoDoesn't that mean that you immediately lose data if a node goes down or a disk dies? FWIW the split brain problems (while not impossible) are extremely rare in ES in my experience. Seems like you've traded one potentially rare problem for a lot more complexity and other problems.
- AznHisoka 12y agoI'm using Sidekiq, a messaging queue framework to handle indexing data to my nodes/clusters. So if one goes down, it will always retry reindexing in a future time over and over until its successful. Everytime there's new data, I need to send the same data to all of the clusters.
- gibrown 12y agoInteresting. Were you actually seeing failures without running multiple clusters?
- linux_devil 12y agoInformative , started looking into ES since past week for indexing , really like the ease of use in ES , but definitely there are few points to be kept in mind.
- keypusher 12y agoAs someone who is currently building out a distributed storage cluster system, this series has been amazing. Not only are the results informative, but I have learnt so much about clustering, consistency, testing methodology and what to look for when evaluating reliability on these systems. Very nicely done.
- itamarhaber 12y agoYep - Aphyr, the destroyer of databases :)
- syntern 12y agoI'd rather say "destroyer of database myths".
- chaostheory 12y agoAphyr calls it Jespen ;) https://github.com/aphyr/jepsen https://github.com/aphyr/jepsen
- phunge 12y agoAbsolutely agree. The author is a quadruple threat -- knows the theory, communicates clearly, gets their hands dirty, and is incredibly thorough.
- eli 12y agoI am probably just an aging fuddy duddy, but the animated GIFs make me much less likely to share this article with my team.
- aeontech 12y agoDo you have no comment on the (brilliant, imho) substance of the article, just the presentation?
- loqi 12y agoI don't, except to note that bad presentation is way more annoying when paired with high-quality content. If it was just about anyone else, I'd have closed the tab. If enough people complain this time, maybe I won't have to waste a couple minutes clicking "Inspect Element -> display: none" on all the animated junk before reading the next article.
- Rapzid 12y agoSubjective criticism is subjective.
- itsdevlin 12y agoI read this strictly for the animated gifs.
- lomnakkus 12y agoIs this sarcasm or are you actually being serious? If you're being serious, why are you letting such absurdly superficial issues determine whether to share a genuinely informative and intereseting article?
- aikah 12y agoSomeone could ask the same but backward,why waste a good article with childish animated gifs.
- johnnymonster 12y agowhats up with the OP and barbie memes?
- SEJeff 12y agoaphyr is homosexual and isn't afraid to let the world know[1]. I think it is just his own humor. I actually find it pretty hilarious how often he changes his twitter picture and the strange things he switches them to. It is just a quirk of an incredibly brilliant person, which I personally find hilarious. That being said, he has a great point of view on non-tech things and is a super humble guy. As quoted from the movie Van Wilder, "You shouldn't take life so seriously, you'll never get out alive!" http://aphyr.com/diversity http://aphyr.com/diversity
- deleted 12y ago[deleted]
- anomaly47 12y ago+1
- deleted 12y ago[deleted]
- bch 12y agohttps://twitter.com/aphyr/status/479726976471539713 https://twitter.com/aphyr/status/479726976471539713
- peterwwillis 12y agolol lol lol lol lol lol lol lol lol @aphyr #homosexual #barbies #makessense
- dang 12y agoWhat exactly are you trying to say?
- silenteh 12y agoI am currently writing a Golang client for Elasticsearch which uses the native binary protocol and I have to say the lack of documentation about it is making the process really painful! I tried to use the Elasticsearch thrift plugin but unfortunately it does not work for the version 1.1 and 1.2 So basically I have to inspect each and every byte of each and every request and response in order to be able to send or parse data. While developing the client a managed several time to crash the Elasticsearch server by sending malformed packets. In addition, this, brought me to review the networking part of Elasticsearch code and I think it needs a refactoring and a better, deeper and cleaner usage of Netty. I hope they will soon sort out this and the problems mentioned in the article, since I think that Elasticsearch is really an amazing product!
- diminish 12y agoSo if Elasticsearch is a stringified (JSON/HTTP) wrapper around Lucene with simplified setup for the web app crowd, you are making a binary-fied wrapper around it. Why not skip ES altogether, or use the JSON api?
- lobster_johnson 12y agoElasticSearch is a lot more than just a "stringified wrapper around Lucene". Lucene is used for the underlying inverted indexes, the item store and tokenization/analysis, and that's pretty much it. ES adds clustering, a query DSL, configuration, data mapping system, "river" functionality, HTTP API etc.
- silenteh 12y agoThe clients actually acts as a cluster node and therefore has knowledge about the cluster state, its indexes and shards, because it receives notifications from it, once it joins. This allows to execute operations on a specific shard of a specific index on a specific node of the cluster resulting in better performance than going through the HTTP interface. It can be used to efficiently store big quantities of data, for instance logs, which then can be visualized with Kibana. It's just unfortunate that Elasticsearch presents the problems mentioned in the article and which I also experience in production, because it has a series of plugins which makes it a good solution for specific use cases.
- nsxwolf 12y agoCan someone explain the "Call me maybe" theme/meme? I know it is a song, but what's the relevance here? Edit: I looked at the archive and found the original post where it is ... erm... explained?
- bjt 12y agoThe name of the "Call Me Maybe" artist is Carly Rae Jepsen. The name of the test framework is Jepsen. Nodes in distributed systems call each other. Except under partitions, when they call each other... maybe.
- deleted 12y ago[deleted]
- RossDM 12y agoThe gifs are annoying when one is trying to focus on the text and sees movement out of their peripheral vision.
- room271 12y agoThe 'Nic' he quotes in the article is me :) This is seriously the highlight in my career folks! Although to be fair, he quotes me generously. Later on in that discussion I give up my wisdom and get confused again.
- donretag 12y agoI'm in there as well.
- Radim 12y agoIndeed. ElasticSearch is super useful, but its docs used to be of the frustrating variety: "Explain minute API details, as if a passing note from the lead dev to himself, assuming all context and concepts are understood and obvious. Don't bother with why's & what's & high-level nonsense." It's been improving lately though, "going big" helped ES here. My personal favourite: an issue from 3 years ago, where ElasticSearch returns incorrect facet counts (as in, fundamentally BROKEN faceting). Still unresolved: https://github.com/elasticsearch/elasticsearch/issues/1305 https://github.com/elasticsearch/elasticsearch/issues/1305
- capkutay 12y agobut its docs used to be of the frustrating variety I hope this doesn't sound like a knock on open source technology, but when a company's only revenue stream is providing training and support for an open source framework, doesn't writing laconic documentation seem to be in their interest?
- stingraycharles 12y agoThat depends on how you look at it. A short-sighted manager might think that way, but it will hurt (early) adoption / engagement. The target audience for big support contracts are enterprises anyway, and they will not buy support solely for the documentation.
- capkutay 12y agoThese guys win early engagement by being free and having awesome functionality. Want to tune it to actually work for your needs? Trying to figure out how to use our 'RAMOptimization' library? Better start buying some training!
- michaelt 12y agoEqually, if a company's only revenue stream is paid upgrades, doesn't that mean releasing software in urgent need of upgrading, with bugs and poor forward-compatibility is in their interests? And if a company's only revenue stream is monthly or annual subscriptions, doesn't that mean firing all the developers and letting the product stagnate as money keeps flowing in is in their interests?
- programminggeek 12y agoElasticsearch is great for um... search. Like, you use it as an index to point to the real system of record and it is not expected to be perfect (or shouldn't' be). I though it worked out real well when used to alleviate pressure on the database which was being used for search results (which were sometimes ajax live search style). The big benefit was our database usage went down and search was better/more reliable. The other big benefit is if elastic search goes down search stops working. That is FAR better than if elastic search goes down the whole database and site stops working. At a big enough scale, with thousands of dollars in transactions every day, the database can't go down. Search can break gracefully, but the spice must flow (so to speak).
- mattdeboard 12y agoThere are a great many businesses whose entire model is centered on search working, and therefore search breaking is a major problem.
- steveklabnik 12y agoFrom the article: > The good news is that Elasticsearch is a search engine, and you can often > afford the loss of search results for a while. Consider tolerating data > loss; Elasticsearch may still be the best fit for your problem.
- lbarrow 12y agoAphyr is truly amazing. This series of blog posts has introduced me to a rigorous, careful way of thinking about distributing systems. I'm a much, much better developer for having read his blog. How many people can you really say that about?
- benjaminwootton 12y agoI also feel much more stupid after reading his blog. Great content but bad for my ego!
- cjbprime 12y agoAphyr is amazing and we're very lucky to have him doing this!
- bzelip 12y agoI'm not much of a programmer, but it's great to know about this guy. The diversity link someone posted here [0] is inspiring. Off topic question about Aphyr's website: the stylesheet is linked to only as `<link rel="stylesheet" type="text/css" href="/css" />` How and why does this work? [0]http://aphyr.com/diversity http://aphyr.com/diversity
- SethKinast 12y agoThe /css route is being served with the correct MIME type-- "text/css". That's all that really matters, despite the unconventional name. This is likely a route that aggregates a collection of CSS automatically and outputs it.
- deleted 12y ago[deleted]
- uniclaude 12y agoWow. Not only this guy is good at what he's doing, but he also seems to be a great person. I'm impressed.
- sjaaktrekhaak 12y agoShay says they've already "fixed this" [1] and the aim is to get the fix in 1.3. I'm interested in what the fix actually is. To quote Shay: "FYI, the improved_zen branch already contains a fix for this issue, we are letting it bake as this is a delicate change, and we are working on adding more test scenarios (aside from the one detailed in this issue) to make sure. The plan is to aim at getting this into 1.3. We have not yet ran Jespen (which simulates the same scenario we already simulate in our test), but we will do it as well." [1]: https://github.com/elasticsearch/elasticsearch/issues/2488#issuecomment-46135721 https://github.com/elasticsearch/elasticsearch/issues/2488#i...
- fasteo 12y agoI am a happy user of ElasticSearch I always thought that it would pass the "Call me maybe" test with flying colors...Well, not