HNHacker News
TopNewBestAskShowJobs

aphyr

9,565 karma · joined January 15, 2010

https://aphyr.com

Hacker, physics geek, clojurer, rubyist, aikidoist, photographer.

submissionscomments
aphyr··on Jepsen: Dgraph 1.0.2
Aw, thank you! :)
aphyr··on Jepsen: Dgraph 1.0.2
it should not be an infeasible goal

There's been a lot of work on both of these problems, but right now, proving concurrent algorithms correct, and proving equivalency of those algorithms to executable code, are very much open research problems.

aphyr··on Jepsen: Dgraph 1.0.2
Yeah, we did talk about Badger a bit, but I think Dgraph's internal testing was likely going to stress it more than I could over the network. We have occasionally found storage-engine level bugs with Jepsen (Tendermint, for instance), but usually the low request rates mask race conditions in storage libraries. :)
aphyr··on Jepsen: Dgraph 1.0.2
Oh, yeah, that's something I could put together. In the meantime, there's a mailing list and twitter you can subscribe to! https://jepsen.io
aphyr··on Jepsen: Dgraph 1.0.2
Oh, I certainly took no shortage of flack for those early analyses, but I'm glad you appreciated them! Some of my clients have even expressed disappointment that my jepsen.io analyses for them weren't as snarky as the aphyr.com ones! It's a tough situation though--if I were to write snarky analyses, even for unpaid clients, it would raise the possibility that clients could pay for favorable treatment. So... I go through an extensive process, often involving weeks of review with my client and peers, to produce as accurate, professional, and neutral a report as I can.

There's another aspect to this: now that I've established a reputation and people take my work seriously, I don't have to be snarky or aggressive to get attention drawn to these issues. And the DB landscape has changed a lot in the last five years! Engineers want to provide formalized safety guarantees. Vendors are taking these failure modes seriously instead of dismissing them as irrelevant! Since I'm getting paid, I can invest more time into making these analyses real collaborations with the vendors. So I see my role now as more about helping people reach their safety goals, and a little less about shaming folks for making systems that didn't live up to their claims.

My other motivations--letting users know how to work with the databases they've chosen, and giving case studies to help other engineers test and improve their own systems, well, those are unchanged. :)

aphyr··on Jepsen: Aerospike 3.99.0.3
My understanding is that the folks who are responsible for this name were also former aerospace engineers. Name overloading is always tricky, and I hope you can forgive their choices.

Best regards, another grumpy software & physics person. :)

aphyr··on Jepsen: Aerospike 3.99.0.3
> Jepsen thinks transactions can take minutes to complete, and it's ok

Jepsen takes great pains to make no assumptions about the time it takes for transactions to execute. We test systems with millisecond-level timeouts, or multi-minute timeouts, and both work fine.

aphyr··on Jepsen: Aerospike 3.99.0.3
The Redis test was quite early in Jepsen's history, and I totally rewrote the library after that--you can still find the original code in the `old` branch, if you'd like to experiment. The Mongo tests are reasonably current; you'll just need to pass a new --package-url on the CLI, I thiiiink. No promises, of course, compatibility is always a moving target. ;-)
aphyr··on Hazelcast 3.8.3
You're welcome, and yes, I do design consulting as well: https://jepsen.io/services.
aphyr··on Hazelcast 3.8.3
I assume that if you lose your ticket you can always reauthenticate to get a new one, so... that doesn't seem like it'd be too bad, right?
aphyr··on Hazelcast 3.8.3
Oh yeah, I guess this is a startup website isn't it! And Jepsen is... sort of... a startup?

For context, Jepsen started as a series of volunteer nights-and-weekends blog posts and conference talks. About three years in I bootstrapped the business as a consultancy, with one client lined up and ~15K USD in [available] savings. Scraped through the first year by dipping into credit cards, learned a lot about pricing and pipelines, and am doing pretty well now. Having money in the bank lets me do more volunteer work, like this analysis. :)

Jepsen makes money through consulting services (usually paid analysis work), training classes, speaking engagements (I charge at for-profit orgs and speak for free at nonprofit events), and Amazon Marketplace subscriptions.

aphyr··on Hazelcast 3.8.3
Thank you. Unfortunately, it's just not a good fit for a MOOC, in terms of class format and cost.
aphyr··on Hazelcast 3.8.3
Hahaha I suppose that's an entirely legitimate question, isn't it? Just to reassure you, Lisa, yes, this is me, and I'm the only person who works at Jepsen. I'm still exploring voices for the Jepsen brand--since at some point I might hire more researchers, more recent stuff is written with an organizational "we". Suppose I should start adding bylines. :)
aphyr··on Tendermint 0.10.2
To be specific, our "byzantine" faults are limited to very specific types of behavior: running multiple copies of the same validator on different nodes, and modifying on-disk state of the validator. We make no changes to the validator source, don't inject arbitrary messages, don't attempt to invalidate already signed blocks, etc etc.
aphyr··on Tendermint 0.10.2
The jepsen.io server is literally something I hacked together in a few weekends. I wouldn't really point to it as an exemplar of high quality production-facing engineering. :)

That said, it does push 50,000 reqs/sec on my local box, did just fine on an AWS m3.medium, then fell over today at 5 reqs/sec on a heroku "pro" dyno, so... this is something I'll have to address.

aphyr··on Tendermint 0.10.2
I had to migrate prod environments when Skyliner shut down; this is the first release I've done on Heroku. Clearly I should have provisioned more capacity. :) Should be back shortly.
aphyr··on CockroachDB beta-20161013
The clock skew limit controls the maximum latency on reads--so yeah, if you're doing reads that contend with writes, improving clock resolution improves latency. Not entiiirely sure about the throughput impact though.
aphyr··on CockroachDB beta-20161013
You're correct--large clock anomalies (or VM pauses, message delays, etc) can cause serializability anomalies. I don't exactly know what will happen, because our tests explicitly focused on staying within clock skew bounds.

To speculate: if clocks do go out of bounds, I don't... think... you can violate single-key serializability, because that goes through a single Raft cluster, but you can definitely see multi-key consistency anomalies. I think you could also get stale single-key reads, because the read path IIRC relies on a time-based lease. Might be other interesting issues if Cockroach is shuffling data from one Raft ensemble to another--I think the range info itself might have a time-based lease that could go stale as well. Perhaps a Cockroach Labs engineer could comment here?

Note that the time window for these anomalies is limited to a few seconds-nodes will kill themselves when they detect clock skew.

aphyr··on CockroachDB beta-20161013
As I mentioned in the article's introductory paragraphs, where Spanner forces a minimum latency on writes to ensure consistency, CockroachDB pushes that latency to reads which contend with a write.
aphyr··on CockroachDB beta-20161013
To be a tad more concrete: GunDB can run in the browser as well as on servers; CockroachDB is a traditional, client/server database. GunDB is aiming for eventual consistency, but when I looked a year ago, it seemed like the algorithm they chose wasn't actually convergent--nodes could diverge because non-commutative updates could be applied in different orders on different nodes. CockroachDB, by contrast, is a serializable, single-key linearizable store. I don't think GunDB offers transparent sharding or SQL, both of which are important aspects of CockroachDB.

Both depend on wall clocks.

aphyr··on CockroachDB beta-20161013
Bingo. I've been hoping Google (or, heck, any colo provider) would offer this for a few years. Semi-synchronous clocks enable significant performance optimizations!
aphyr··on CockroachDB beta-20161013
I agree that it can and should be faster, but the targets will depend on what you're going for. 20k linearizable reads/sec on EBS-backed instances is, uh, maybe a tad optimistic.
aphyr··on CockroachDB beta-20161013
Just as a headsup, I left Stripe in late 2015 to run Jepsen as an independent consultancy.
aphyr··on CockroachDB beta-20161013
I just want to emphasize that:

a.) this is a beta product where the team has been focusing on completeness and correctness before performance

b.) I was testing Cockroach from August through October--Cockroach Labs has put a good deal of work into performance in the last three months, but that work hasn't been merged into mainline yet. I expect things should be a good deal faster by 1.0.

c.) Jepsen does some intentionally pathological things to databases. For instance, we choose extremely small Cockroach shard sizes to force constant rebalancing of the keyspace under inserts. Don't treat this as representative of a production workload.

aphyr··on MongoDB 3.4.0-rc3
Clustering columns do not make Cassandra updates any safer: they only reduce the scope of conflicts. It's still last-write-wins--the approach that Cassandra's own blog recognizes as "a high potential for data loss".

That's why Cassandra offers choice at a query level.

It doesn't give you a choice: you get last-write-wins, or some limited merge functions with CQL types. You can't get generalized CRDTs in Cassandra, because they won't expose conflicts to the user layer. Cassandra gives up on a whole class of safe AP datatypes as a consequence of this restriction.

aphyr··on MongoDB 3.4.0-rc3
http://www.slideshare.net/NorbertoLeite/mongodb-wiredtiger-i...
aphyr··on MongoDB 3.4.0-rc3
> assume updates can be sometimes applied in a different order than they were submitted

I suggest you re-read the analysis. Some databases can offer safe, generalized commutative updates; e.g. Riak. Cassandra can't: updates, in general, can be lost through reordering.

> There is no better way than last write wins if you want high availability and partition tolerance and don't want to pay the performance and availability price for a consensus algorithm like Paxos or Raft.

There is. There's a whole field of research devoted to this problem. http://hal.upmc.fr/inria-00555588/document

aphyr··on MongoDB 3.4.0-rc3
Pretty sure Cassandra still uses local timestamps and last-write-wins, which means you can't do safe updates. Also pretty sure they didn't fix the timestamp-collision row-isolation issue I talked about, because it was on HN's front page a few months ago. ;-)
aphyr··on MongoDB 3.4.0-rc3
I'm not exactly sure what you're trying to say, but perhaps I can help provide context:

In 2013, I performed an unpaid analysis, in my nights and weekends, of MongoDB. I found a bug leading to the loss of acknowledged writes with majority write concern. Mongo fixed this bug within a few weeks.

In 2015, I performed a followup test as a part of my work at Stripe. I confirmed dirty reads (which were already documented, though perhaps not well-appreciated), and discovered stale reads (which ran counter to MongoDB's documentation). MongoDB wasn't enthusiastic about that report initially, but got things sorted out and started work on adding majority and linearizable read concerns. I found that writes appeared linearizable.

In spring and summer of 2016, MongoDB paid me to help expand the Jepsen tests and hook them up to their internal CI system, so they could use the Jepsen tests to help verify their ongoing work towards linearizable reads. I privately confirmed that MongoDB still failed to prevent stale reads, but the dirty-read failures I'd seen in 2015 appeared to be prevented by majority reads.

In fall 2016, MongoDB announced they were almost ready to release 3.4.0 with support for linearizable reads, and paid me to perform a full analysis so they could be more confident in the results. It passed the linearizability tests I had initially written in 2015, but I offered to expand the tests to be more aggressive. Our collaboration resulted in the present analysis, uncovering design flaws in v0 and implementation bugs in v1. MongoDB worked to develop patches prior to 3.4.0's release, and that's why it passes now. :)

aphyr··on MongoDB 3.4.0-rc3
It might be better to think of it as a limitation of two-generals, rather than 2PC in particular.
← PreviousPage 8 of 26Next →