18 ms·
RethinkDB 2.1 is out: high availability
- coffeemug 11y agoSlava @ RethinkDB here. I'll be around all day to answer questions about the release (along with a few other engineers on our team). We're very excited about this release -- it makes the lives of RethinkDB users dramatically better because they won't have to wake up anymore in the middle of the night in case of most hardware failures :) It also took over a year to build and test, and has been one of the most challenging engineering problems we ever had to solve.
- ukd1 11y agoAwesome work guys. Could you give some details on what you're most proud of and what was most challenging?
- jaz46 11y agoAre you interviewing the RethinkDB team here, Russell? ;)
- coffeemug 11y agoThere are two parts to this that are really challenging -- designing a robust system (since there are a million different edge cases that can happen in a distributed system), and designing an intuitive interface so that the database does the right thing out of the box, is configurable if users want that, and is actually easy to configure in practice. Doing each thing independently is hard; doing both of them together in one system is really really hard. I'm particularly proud of how nicely everything clicks together, and how elegant the administration API is. It seems very simple and is extremely powerful; getting that right took many iterations over the course of a year.
- k__ 11y agoA bit off-topic, but can you recommend any RethinkDB SaaS providers?
- coffeemug 11y agoMany of our users use compose.io, and it's pretty solid. I highly recommend them.
- karlgrz 11y agoFantastic news, this looks great! Just a quick question, can I update individual nodes one at a time in my running cluster, or do they all need to be on 2.1 at the same time?
- danielmewes 11y agoUnfortunately 2.0 nodes cannot connect to 2.1 nodes and vice versa, so depending on your table configuration you might need to update all of them at the same time.
- karlgrz 11y agoNo problem, was just curious. Thanks!
- mikegioia 11y agoI'm evaluating a move from CouchDB to another system purely as an easily sharded/replicated KV document store. Do you recommend Rethink for that specific use-case or is it overkill? Your docs seem to convey that this isn't really in Rethink's wheelhouse (in that RDB is more suited for querying or real-time updating).
- coffeemug 11y agoRethinkDB can definitely act as a distributed key-value store (and a pretty good one). But I think the choice is highly dependent on your use-case and requirements. Could you go into a little more depth wrt your workload? (e.g. number of records, average record size, read/write ratio, expected ops/second, etc.)
- mikegioia 11y agoYea of course. We're basically talking about 10/90 write/read on JSON documents ~100kb in size with very low load, probably no more than 10-20 ops/second at peak. Records now are at 200,000 projected to grow 250k/year.
- coffeemug 11y agoThanks! I'd definitely give RethinkDB a try, I think you'd be pleasantly surprised at how nice it can be for this. You'll also find that you might want to run ad-hoc queries on JSON documents (e.g. for analytics/exploratory analysis, etc.) and having ReQL at your disposal will be great for that. IMO picking a KV store makes the most sense if you have insane performance requirements (e.g. millions of ops/second) where you need to squeeze every last drop of performance and the query layer gets in the way. (Also if you have any questions and don't want to share more info publicly, feel free to shoot me an email -- slava@rethinkdb.com)
- mikegioia 11y agoThanks, Slava I appreciate you taking the time here.
- eloff 11y agoI'm curious about "We chose to only store cluster metadata in Raft due to performance limitations imposed by distributed consensus" I would naively assume that since you need to replicate your database to the slave servers, you need to send the WAL or changes somehow anyway. Could you elaborate on what was the problem there? I'd be surprised if it is because of a fundamental limitation of Raft (but could easily be a limitation of a Raft library!)
- coffeemug 11y agoSuppose you configure RethinkDB to store three copies of the data. When you do a write, RethinkDB will replicate the data to three nodes; that operation is roughly a matter of sending three messages to the appropriate nodes, getting the acks, and sending the ack back to the client. If we used Raft to replicate the document, in many cases it would be a lot more chatty. If you look at the Raft paper and track all the messages that would have to go back and forth, it would dramatically increase the latency for each write. This is inherent to Raft (and any distributed consensus protocol). Unfortunately distributed consensus isn't free; you have to pay pretty heavy latency costs which would be unacceptable in production, so we couldn't just uniformly apply that to every write.
- eloff 11y agoOK, so it's a latency concern, which makes perfect sense. > If we used Raft to replicate the document, in many cases it would be a lot more chatty. I'm out of my depth here. Leader needs to send AppendEntries and slave needs to apply to persistent storage and ACK. Leader needs to wait for majority of ACKS before responding to the client. That's the same as your three-node replication scenario, so what am I missing here? Does Rethink db relax consistency guarantees in some cases to achieve better latency? It's not your job to educate me on Raft, I appreciate your being patient with me, but feel free to opt out of this conversation anytime you please.
- coffeemug 11y ago> Leader needs to send AppendEntries and slave needs to apply to persistent storage and ACK. Leader needs to wait for majority of ACKS before responding to the client. That's the same as your three-node replication scenario, so what am I missing here? A couple of things -- the payload in Raft tends to be much higher (though it could probably be fixed with sufficient engineering effort), and in some scenarios this process would have to happen multiple times during netsplits (which may or may not be ok). RethinkDB doesn't relax consistency guarantees; we implement them in a different way. Check out http://rethinkdb.com/docs/consistency/ http://rethinkdb.com/docs/consistency/ for more details. I'm a bit busy today, but this is a really interesting question. I'll see if we can do a technical blog post on this and go into all the details in depth.
- hipsterrific 11y agoI'm excited to work with RethinkDB on my pet projects. Glad to hear you guys beefed up failovers, that's a big deal in a lot of places. ;)
- chucksmash 11y agoIt's a joy to use for side projects! I'm using it as the datastore in a web app for learning that automatically generates quiz questions from user-provided data. Integrating with it using the Python API has thus far been dead simple.
- otterley 11y agoHave you Jepsen-tested the new 2.1 release? If so, what were its results?
- coffeemug 11y agoYes. We did months of internal tests, and 2.1 passes Jepsen tests. We'd love for Kyle to do his own analysis once he gets some free time. In the meantime there is a bit more info on this in the blog post under "testing" headline.
- kenko 11y agoCan one commission Jepsen analyses from Kyle? Or is it more a matter of hoping he'll do it on his own?
- teraflop 11y agoBased on this pull request: https://github.com/aphyr/jepsen/pull/70 https://github.com/aphyr/jepsen/pull/70 Am I correct in understanding that the tests only pass in the "safe-but-slow" configuration that timmaxw described (https://news.ycombinator.com/item?id=10043746 https://news.ycombinator.com/item?id=10043746) and not in the default "fast-but-unsafe" configuration?
- coffeemug 11y agoAFAIK the tests account for that and test different scenarios (i.e. not all unsafe modes are created equal; a product can still fail the relevant test cases in fast-but-unsafe mode). We pass the fast-but-unsafe tests (i.e. we fulfill the guarantees you'd expect in that mode), and also pass the stricter guarantees in the slow-but-safe mode. However you're right that we don't pass stricter guarantees in fast-but-unsafe mode (but I'm not aware of any products in the space that do).
- teraflop 11y agoGood to know. The test code in that pull request only tests the case where read_mode="majority", so I'm looking forward to seeing the other scenarios when they become available.
- balls187 11y agoWe're seeing serious memory leaks in 2.0.4~trusty. http://glui.me/?i=uu1gqb3son0sbnn/2015-08-11_at_11.33_AM.png/ http://glui.me/?i=uu1gqb3son0sbnn/2015-08-11_at_11.33_AM.png... You can see where the memory sets itself during the rethink process restart, and then it slowly climbs back up to ~3gb, despite no new data being written to the system (all our RethinkDB data is generated during deploy time). Any pointers? I'd be happy to provide any diagnostics.
- mglukhovsky 11y agoYou should open an issue on GitHub, so we can track it down: https://github.com/rethinkdb/rethinkdb/issues https://github.com/rethinkdb/rethinkdb/issues It helps if you include information on your setup in the issue (for a list of helpful details, read "How to submit a bug report" here: http://rethinkdb.com/docs/crashes/ http://rethinkdb.com/docs/crashes/).
- coffeemug 11y agoThanks for reporting this! The image doesn't seem to load for me. Would you mind opening a GitHub issue (https://github.com/rethinkdb/rethinkdb/issues/new https://github.com/rethinkdb/rethinkdb/issues/new) with as many details as possible? We need to know a bit more about the infrastructure/workload to replicate this; once we get the info we'll get to the bottom of it ASAP. Also feel free to e-mail me at slava@rethinkdb.com if you need urgent/critical support.
- _yy 11y agoFor anyone curious: https://github.com/rethinkdb/rethinkdb/issues/4663 https://github.com/rethinkdb/rethinkdb/issues/4663
- fweespeech 11y agoHow is the WAN replication performance for a cluster in 3 DCs with ~100-200ms RTT? Or is WAN replication performance on the todo list?
- coffeemug 11y agoWAN replication works out of the box, and RethinkDB was designed with multidatacenter setups in mind. Feel free to email me at slava@rethinkdb.com if you need to discuss a specific use case.
- kevinbowman 11y agoCongrats on the release! Could you update the docker hub image? I'm impatient to try it...
- Scarbutt 11y agoWould RethinkDB be a good choice for an invoicing web application? where you can't afford loss of data.
- coffeemug 11y agoYes. RethinkDB has very strict durability guarantees (that are the same as traditional RDBMS). However, if you need transactions compliance across multiple documents, RethinkDB isn't a good choice. See the faq for more details: http://rethinkdb.com/faq/ http://rethinkdb.com/faq/
- lobster_johnson 11y agoAre there plans (heh) to write an optimizing planner that can automatically evaluate which indexes to use?
- coffeemug 11y agoYes. There are a couple of proposals floating around -- check out https://github.com/rethinkdb/rethinkdb/issues/4150 https://github.com/rethinkdb/rethinkdb/issues/4150 for details.
- deleted 11y ago[deleted]
- akbar501 11y ago@coffeemug, do you have an ETA on when performance benchmarks will be released?
- coffeemug 11y agoThis is totally my fault. I've had a pretty comprehensive benchmark report pdf sitting in my inbox for a few months now that the performance team put together, but something else always took my attention away. I'll ask the documentation team to format it and add it to the official documentation. Sorry this slipped through the cracks.
- GordyMD 11y agoReally looking forward to seeing this.
- shockzzz 11y agoUhhh what? "Added support for Jepsen tests" shouldn't mean "we sent Kyle a pull request" That seems like deceptive marketing to me. Once the pull request is merged, then you can make that claim. Here's the open PR for Jepsen: https://github.com/aphyr/jepsen/pull/70 https://github.com/aphyr/jepsen/pull/70
- coffeemug 11y agoI wrote that paragraph of the blog post, and I think I didn't phrase it correctly. What I meant to say is that we hacked Jepsen tests to support RethinkDB, and then ran the tests internally for months. I added that note late last night, definitely could have phrased it better. We've been working with Kyle on this though, and I think he seemed happy to merge the PR (but he's pretty busy). Hopefully will happen soon, sorry for confusion. EDIT: here is some context -- https://github.com/rethinkdb/rethinkdb/issues/1493#issuecomment-124598319 https://github.com/rethinkdb/rethinkdb/issues/1493#issuecomm....
- williamstein 11y agoThis is soooo awesome. I started rewriting SageMathCloud to use RethinkDB when I learned in May about your plans to support high availability. I've been rewriting everything, doing tests (building from sources, then using the beta you kindly provided), and finally after months of work, I'm ready to release the new version of SageMathCloud last night, but RethinkDB 2.1 isn't out yet. So I'm torn about whether to go with 2.1beta and cross my fingers, or just wait, or what. And this! Thank you so much. RethinkDB is, for my use, the first database I've ever actually really loved (and React.js+flux the first web framework). Here's my client code in case anybody is curious: https://github.com/sagemathinc/smc/blob/rethinkdb/salvus/rethink.coffee https://github.com/sagemathinc/smc/blob/rethinkdb/salvus/ret...
- d_luaz 11y agoI would like to encourage more people to share on StackBus (FYI, I built it) on why they use RethinkDB and what they use it for, to provide more insights to those who are evaluating RethinkDB http://www.stackbus.com/ http://www.stackbus.com/
- dmix 11y agoI used it because everything all data comes from JS apps and JSON->storing in Rethinkdb is incredibly easy. Plus hooking up changefeeds (event stream for whenever a table changes) has tons of usecases (analytics, IRC bots, etc).
- kureikain 11y agoFinally, we can convince our management to start to use it. All of the beautiful of ReQL, then addhing high availability What else I can expect more.
- Spiritus 11y agoI couldn't really find any good docs on how to use the various async Python drivers...? All I found was some references to Tornado under `set_loop_type`. Also, very much looking forward to trying this out!
- coffeemug 11y agoTake a look at this -- http://rethinkdb.com/docs/async-connections/ http://rethinkdb.com/docs/async-connections/
- mglukhovsky 11y agoBesides the documentation article Slava linked to, you might find this blog post helpful: http://rethinkdb.com/blog/async-drivers/ http://rethinkdb.com/blog/async-drivers/ If there's anything else you think is missing from the documentation that would be helpful, open an issue here: https://github.com/rethinkdb/docs https://github.com/rethinkdb/docs
- danielmewes 11y agoWe're still working on the full documentation for the Twisted and asyncio backends. We'll put it up in the next days. You can find the Tornado documentation under the link coffeemug mentioned.
- mateuszf 11y agoAs a heavy Heroku user - I'm wondering - is there some hosted RethinkDB solution?
- mglukhovsky 11y agoCompose.io offers hosted RethinkDB instances, I'd recommend them: https://www.compose.io/rethinkdb/ https://www.compose.io/rethinkdb/
- sam-mueller 11y agoUtilizing rethinkdb on compose.io with heroku does take some hackery, mainly around deploying to the same colo (amzn us-east-1), and then using heroku env variables to store your ssh key that will be used to connect your api/svc to compose box. See this article for more info: https://www.compose.io/articles/tunneling-from-heroku-to-compose-rethinkdb/ https://www.compose.io/articles/tunneling-from-heroku-to-com... I was never able to get the referenced python script working, but using a shell script inside `.profile.d` did the trick.
- nkohari 11y agoWe've been using compose.io with good success.
- EugeneOZ 11y agoComics is awesome.
- uberneo 11y agoThis looks awesome .. great job guys .. Just a question on licenses . Server is "GNU Affero General Public License v3.0" and drivers are "Apache License v2.0." , so in simple english does it means that can i use make commercial products with backend as RethinkDB? these things always confuses me so apologies if i ask something stupid here ..
- coffeemug 11y agoYes, you can build a commercial product with RethinkDB in the backend without paying us any money; that's explicitly allowed by this licensing scheme.
- friendnoodle 11y agoThe AGPL confuses a lot of people on a lot of projects. It's actually really simple: If you modify the package (RethinkDB itself, in this case), you have to release your changes. That's it.
- ahachete 11y agoThat's not precise. If you modify the package and distribute it to your users, they must have access to the source code (including the changes, which also become licensed under the same terms). Up to this point, it's the same as with GPL. AGPL also enforces code and changes to be distributed to the users if they directly consume your database over the network. This would be the case, for example, of a database-as-a-service. Put it simply: you use an AGPL database, internally, even for your SaaS: you're fine. You either modify RethinkDB and ship it as a product or you provide a RethinkDB or RethinkDB-derived database-as-a-service, then you have to also provide source code to your users.
- tacone 11y agoAGPL is outright scaring. Patch it and suddenly you get in the business of releasing code, checking dependencies licenses, exposing the server code to anybody, etc. Deal breaker.
- 11y ago
- wilsonfiifi 11y agoGreat news! Keep up the good work. It's getting harder and harder to justify not using rethinkdb in production :-) ...Doesn't seem available on homebrew yet though.
- coffeemug 11y agoWe should be able to make it available on brew very soon.
- wilsonfiifi 11y agoThanks!
- chadlung 11y agoVery cool, thanks for all the hard work that went into this. Will the docs [1][2] be updated at some point to reflect the Python 3.4.x asyncio support? Right now just Tornado is documented. [1] http://rethinkdb.com/docs/async-connections/ http://rethinkdb.com/docs/async-connections/ [2] http://www.rethinkdb.com/api/python/set_loop_type/ http://www.rethinkdb.com/api/python/set_loop_type/
- coffeemug 11y agoYes, we'll update the docs very soon.
- juijasmem 11y agoCan I ask please why you don't provide ready to use, fine tunned amazon images? This is preventing me to use it now as I cannot find reliable configuration or information. Also the current image is out of date. Thanks
- coffeemug 11y agoThis article describes deploying on AWS with a pre-built AMI -- http://rethinkdb.com/docs/paas/ http://rethinkdb.com/docs/paas/. We have an aggressive release cycle and try to release ever 2-4 months. Unfortunately the process to get an image onto AWS is fairly slow (with the exception of security patches). So the AMI images are unfortunately a little behind. We're working hard to update them as soon as possible, but unfortunately most of the process is out of our hands.
- mglukhovsky 11y agoAmazon changed the image format, and we've been working to update our images to use it. Here's some more detail: https://github.com/rethinkdb/marketplace-ami/issues/1 https://github.com/rethinkdb/marketplace-ami/issues/1 If you like, you can launch a 1.16 AMI, ssh into the instance, and run `apt-get update && apt-get install rethinkdb` to update to RethinkDB 2.1. Thanks for being patient -- we'll get the official images updated soon.
- GordyMD 11y agoSo happy you've added in Math functions into ReQL. Thank you!
- dantiberian 11y agoRethinkDB is great and has a lot of great features, however the thing that has impressed me the most is the way they communicate with the community. They are incredibly responsive and friendly on GitHub and IRC. It's not uncommon to get a response to a bug report within an hour or two (not that they have any obligation to this). They're incredibly nice. It looks like they try to follow http://www.defmacro.org/2013/04/03/issue-etiquette.html http://www.defmacro.org/2013/04/03/issue-etiquette.html, it'd be great to see other companies adopt it too. Thanks folks!
- hardwaresofton 11y ago+1 to this, visited the team (I happened to be in California) once with very very short notice, and the office was a small tight-knit nice group of people.
- tracker1 11y agoI could not agree with this more.. the development teams are definitely active with the community via github and irc... I followed along with the support for geolocation indexes, and was really happy to see that come into play. It's taken a while to get to this point, but the development to get here has been methodical and incredibly well managed in terms of getting appropriate groundwork in place for a feature (like automatic fail-over) instead of just trying to hack at it or bolt it on the side. For that matter baking solutions for data streaming into the box, as opposed to less thoughtful options.
- tracker1 11y agoI've said before how I really appreciate the approach the guys at RethinkDB have taken... With the automatic failover support baked in, this would definitely be one of my go to solutions. The management/admin interface is much nicer than any other NoSQL database out there, while offering a lot of the things that a traditional RDBMS offers. I'd probably reach for RethinkDB before Postgres or others simply for the better administrative experience. Especially for small teams or start-ups that don't have a dedicated DBA role. For anyone curious, the databases I would most likely reach for, depending on the situation would be RethinkDB, ElasticSearch and Cassandra. I really do like MongoDB a lot as well, but RethinkDB offers the features with far less friction, though the query interface takes a bit of getting used to. That said, I also like more traditional RDBMS options as well. I REALLY like what PostreSQL offers, but have no desire to administer such a beast, failover isn't really baked in, and the best options are only commercially available, at a significant cost. There are also hosted options for AWS and Azure for various SQL RDBMS. That said, I find being able to have data structure hierarchies in collections tends to be a better fit for MANY data needs. Congratulations to Slava and everyone else at RethinkDB.
- gauravphoenix 11y agoofficial JDBC drivers please :)
- tracker1 11y agoI know it's kind of a mixed bag. I'm also slightly, but not completely surprised that .Net and Java aren't officially supported.. I wouldn't expect JDBC support, but would expect to see a Java library for use with RethinkDB. Given the flexible nature of RethinkDB and other document databases, dynamic language environments tend to be much easier to support over static environments like .Net and Java. Honestly, if you want to use RethinkDB with Java, it may be worthwhile to write a domain centered service with Node or Python and have that as an intermediary for Java. I've actually used Node on several occasions as a translation service for requests to foreign systems as sometimes there's a lot of disconnect in specific implementations of SOAP/WS-* services from Java/PHP/.Net etc. It tends to work very well for this use case. I've actually been looking at GraphQL with some interest, and thinking this could be a pretty awesome option in front of RethinkDB, which would open up to pretty much any client that supports graph, which is limited right now...
- habitue 11y agoI'm actually writing the official Java driver right now. We should have a beta version out in a few weeks Follow https://github.com/rethinkdb/rethinkdb/issues/3930 https://github.com/rethinkdb/rethinkdb/issues/3930 for progress updates
- segphault 11y agoWhile it's not JDBC, we are working on an official Java client driver: https://github.com/rethinkdb/rethinkdb/issues/3930 https://github.com/rethinkdb/rethinkdb/issues/3930
- habitue 11y agoIt won't be JDBC (since we have our own language ReQL) but we're working on an official java driver now: https://github.com/rethinkdb/rethinkdb/issues/3930 https://github.com/rethinkdb/rethinkdb/issues/3930
- uberneo 11y agoGreat documentation with some useful examples and tutorials to get you started. I just tried it and very impressed with the performance and ease of use , especially the admin section is very handy. Need to try it with cluster , any docs/videos on creating the cluster with different machines across the globe?
- coffeemug 11y agoCheck out http://rethinkdb.com/docs/sharding-and-replication/ http://rethinkdb.com/docs/sharding-and-replication/ -- lots of information there.
- barosl 11y ago> Always on – you can add and remove nodes from a live cluster without experiencing downtime. This has been a long-awaited feature for me. While I loved nearly every aspect of RethinkDB, it was the reason that made me hold back from using RethinkDB. Good to see RethinkDB keep improving!
- level09 11y agoGreat news, Does any one know/recommend a python ORM for RethinkDB ?
- mikes25 11y agoAny support for Windows yet? I'm keen to move to rethinkDB from using redis, but my development is done on Windows at the moment.
- mglukhovsky 11y agoA Windows port is in progress (https://github.com/rethinkdb/rethinkdb/labels/windows https://github.com/rethinkdb/rethinkdb/labels/windows), but it will take some time to complete. Windows support is one of our most-requested features: https://github.com/rethinkdb/rethinkdb/issues/1100 https://github.com/rethinkdb/rethinkdb/issues/1100