5 ms·
Do you want to know how popular systems are actually built, from the inside, or do you want carefully groomed triumphal announcements of new, perfectly-formed f
by tptacek 5y ago
Do you want to know how popular systems are actually built, from the inside, or do you want carefully groomed triumphal announcements of new, perfectly-formed features?
I struggle with this a lot in my writing too, but I've drawn a conclusion I'm sticking with: it's better to relay what the team is actually doing, "warts" and all. We ranked on HN a few weeks ago with a post about user-mode WireGuard that was basically a litany of engineering mistakes, and it's one of the things I've most enjoyed writing.
Every serious product gets built the way Tailscale is describing. You start some components with the simplest thing that can reasonably work, and see how far you can take them. The JSON file Tailscale used to use was one of the most interesting and valuable things they wrote about.
If you want content about how to built best-practices-compliant hyperscaler-grade systems, there are places to go to get that kind of content. But you've never had a problem with Tailscale that owed to their JSON file backend not scaling --- how I know that is, you've likely never experienced a stability problem with Tailscale at all, because it just doesn't break. That they got it to work, for a long time, with a JSON file backend should make you think harder about how you build things.
- rob_c 5y agoYes but userland wireguard is unique and useful. This is ignoring textbooks, competitors who write about their exploits warts and all and screams of get a more experienced db team to work with you... shoving it into a json screams of throw it at a disk and let the hardware deal with it
- lostcolony 5y ago>> shoving it into a json screams of throw it at a disk and let the hardware deal with it Which...worked. For quite a long time. And required no dev effort. Freeing devs up to focus on other things. They did it as a POC, and it worked, better even than they had anticipated; why over-engineer it up front? Even when it turns out they are gonna need it (i.e., YAGNI no longer applies), they have been able to push off their "solve problems customers don't care about" to instead favor "problems customers do care about". That...seems like sound engineering to me?
- rob_c 5y agoSpeaking as someone who has had to fix things like this... When you reach capacity and it hits a screaming halt as the hardware capacity has been reached and performance doesn't collapse its completely gone. This is not about best use. Hell json file performance may be well within spec of the system requirements, but jumping up and down without perf numbers or specs is typical of sweep it under the carpet for a generation...
- tptacek 5y agoThat would be a good critique if it was was happening, but they gracefully transitioned from a JSON file(!) backend to etcd, and gracefully transitioned from etcd to sqlite. I'd say they're going to gracefully transition from sqlite, but I think the think people don't have their heads around is that it's possible they'll never need to do that, because of The Unreasonable Effectiveness of SQLite.
- cogman10 5y ago> Do you want to know how popular systems are actually built, from the inside, or do you want carefully groomed triumphal announcements of new, perfectly-formed features? It depends on what that tool is doing and if the thing it's doing is a core competency for your company. It absolutely makes sense to geek out about stuff like this if it's part of your core product. However, if it isn't, then do yourself and your engineering team a favor and pick boring technologies. Do you know what DB system tailscale would be using if they choose something boring postgres or Cassandra? Postgres or cassandra. The cost of not doing that is they are on their 3rd iteration of switching db technologies and the development effort to keep rediscovering the same problems.
- tptacek 5y agoThey picked (checks notes) sqlite. It's quite possibly the most boring choice available!
- cogman10 5y agoAnd they tacked on Litestream, which made for far more interesting failure modes. Hopefully they ran their jepson... oh wait, no they didn't really care about the reasons they ruled out traditional db choices.
- tptacek 5y agoDo you understand how Litestream works? What's the Jepson test you'd do here, to make sure your single, statically assigned leader isn't conflicting with... itself? All Litestream does is ship WAL segments. The whole point of this design is not having the distributed consensus problems (and concomitant schema and development inflexibility) that etcd has.
- mrkurt 5y agoThe cost of complication is high. They're optimizing for simplicity. Both for low friction development and easy operation. sqlite is amazingly simple for local dev. Probably even simpler than a json file. High availability Postgres is complex to operate (you need a whole separate strongly consistent data store to coordinate it). Cassandra is also very complex. sqlite is, again, simpler. Litestream makes sqlite plausible for production.
- musjleman 5y ago> Do you want to know how popular systems are actually built, from the inside, or do you want carefully groomed triumphal announcements of new, perfectly-formed features? IMO both this and "announcements of new, perfectly-formed features" are at the same level (if not lower, because a new feature is still something new). Both are essentially marketing with no technical content that's really worth your time. Except that it's now the third iteration of "we did an obviously questionable thing and replaced it with another questionable solution". > it's better to relay what the team is actually doing, "warts" and all. We ranked on HN a few weeks ago with a post about user-mode WireGuard that was basically a litany of engineering mistakes, and it's one of the things I've most enjoyed writing. I can agree with that, but I wouldn't bunch your writeup into the same group. That's some pretty decent technical content about the problems that were encountered. Meanwhile in these writeups what were the problems? "JSON file database too slow", "Hand-rolled software has to be maintained in-house"? > Every serious product gets built the way Tailscale is describing. You start some components with the simplest thing that can reasonably work, and see how far you can take them. The JSON file Tailscale used to use was one of the most interesting and valuable things they wrote about. Yet they keep changing it, migrating, writing tests for the new code and writing blog posts. The time all these things take even if the size of the new code is less than 100 lines is substantial.
- jbmsf 5y agoI love Tailscale and it's true that I am not suffering from stability problems with its database choices. But, I do have challenges working with their ACL structure -- which is backed by their database -- and specifically would love to be able to update users/groups separately from tag groups and both of those separately from ACL rules and I can't help but wonder if the fact that this feature doesn't exist relates to the fact that the database doesn't normalize these concepts into separate "tables" separated by "foreign keys".
- bradfitz 5y agoTailscale engineer here. Unrelated. We just haven't worked on it much. A bunch of other stuff has been a higher priority. But better ACL management will happen.
- structural 5y agoThis is great to hear. We've been happy users for a couple of years, and the device tagging support has come a long way (and is a big enabler for sensible ACLs), but trying to use Tailscale's ACLs in general has been our biggest pain point with the product.
- dimgl 5y agoI have nothing to add to this discussion, but I wanted to add that I love this comment. Sometimes we have to take a step back and really think about why we're making all of these choices and picking certain tools for a job.