Most active commenters
  • epistasis(5)
  • eru(5)
  • (4)
  • pasteldream(3)
  • fukka42(3)
  • gchamonlive(3)

203 points swills | 96 comments | | HN request time: 2.675s | source | bottom
1. cluckindan ◴[] No.45687983[source]
Always instantly consistent, always available, and perfectly tolerant of partitioning.

Truly, it is the only database which can be scaled to unlimited nodes and remain fully CAP.

replies(6): >>45688157 #>>45688158 #>>45688368 #>>45689353 #>>45690041 #>>45690121 #
2. ◴[] No.45687986[source]
3. pyuser583 ◴[] No.45688089[source]
I've used /dev/null for exactly this purpose. I have output that needs to go somewhere, and I don't want to worry about whether that somewhere can handle it.

Later on in deployment, it will go somewhere else. Somewhere that has been evaluated for being able to handle it.

In that way, /dev/null is to storage what `true` is to execution - it just works.

replies(1): >>45688260 #
4. thfuran ◴[] No.45688157[source]
It's really fast too.
5. ozim ◴[] No.45688158[source]
I guess we have a perfect idea for vaporware here. (pun intended)

I am putting my marketing hat on right now.

replies(2): >>45688398 #>>45688482 #
6. imcritic ◴[] No.45688173[source]
How does a disaster recovery plan with it look like?
replies(3): >>45688189 #>>45688571 #>>45689949 #
7. tadfisher ◴[] No.45688189[source]
There is never a disaster; reading from /dev/null will return the same result before and after any external event.
8. rezonant ◴[] No.45688230[source]
But is /dev/null web scale?
replies(3): >>45688273 #>>45688300 #>>45688765 #
9. CaptainOfCoit ◴[] No.45688260[source]
Bug free software is a pipe dream, but if there is anything I've never encountered any bugs with, /dev/null and true is certainly in the top 3.
replies(3): >>45688480 #>>45688959 #>>45690296 #
10. QuiCasseRien ◴[] No.45688272[source]
Fast and easy to read, funny and fuckingly true !

best post of the week ^^

11. epistasis ◴[] No.45688273[source]
Yes, /dev/null can even power sites like zombo.com
replies(1): >>45688321 #
12. pasteldream ◴[] No.45688300[source]
reference for the unaware: https://youtube.com/watch?v=b2F-DItXtZs
13. bottled_poe ◴[] No.45688321{3}[source]
What’s the I/O throughput of /dev/null ?
replies(2): >>45688365 #>>45688374 #
14. epistasis ◴[] No.45688365{4}[source]
Single client, I'm getting ~5GB/s, both on an 8-year-old intel server, and on my M1 ARM chip.

However with a single server, it doesn't perfectly linearly scale with multiple clients. I'm getting

1 client: 5GB/s

2 clients: 8GB/s

3 client: 8.7GB/s

replies(2): >>45688467 #>>45688477 #
15. tgma ◴[] No.45688368[source]
Always available? Clearly you have not experienced situations with no /dev mounted.
replies(1): >>45688429 #
16. CaptainOfCoit ◴[] No.45688374{4}[source]
You start dealing with Heisen-throughput at that point, it goes as high as you can measure.
17. pasteldream ◴[] No.45688398{3}[source]
Reminds me of Falso.

https://inutile.club/estatis/falso/

18. pasteldream ◴[] No.45688429{3}[source]
One easy way to create such a situation is to use bwrap without --dev.
19. fukka42 ◴[] No.45688467{5}[source]
I'm easily reaching 30GB/s with a single client:

    dd if=/dev/zero of=/dev/null bs=1M status=progress
A second dd process hits the same speed.
replies(2): >>45688575 #>>45688592 #
20. dinkelberg ◴[] No.45688477{5}[source]
How did you measure this? Do you know that /dev/null is the limiting factor, or could it be the data source that is limiting?
21. noir_lord ◴[] No.45688480{3}[source]
Joking aside I can’t ever remember seeing a bug in either bash or zsh, never seen either crash or segfault and anytime I’ve had weirdness it’s always turned out to be me missing something.

Both (along with a lot of the standard utilities) are a testament to what talented C programmers plus years of people beating on them in unintended ways can achieve in terms of reliability/stability.

replies(6): >>45688631 #>>45688712 #>>45689009 #>>45689182 #>>45689808 #>>45689909 #
22. the_jeremy ◴[] No.45688482{3}[source]
You've been beaten to the punch: https://devnull-as-a-service.com/
23. wolrah ◴[] No.45688571[source]
/dev/null is globally redundant across almost every *nix-ish system in operation. Just reinstall your software on whatever is convenient and all the same data will be there.
24. epistasis ◴[] No.45688575{6}[source]
My artisanal architecture design uses writes with a few characters and uses unix pipes:

    yes | pv > /dev/null
I hope that in my next rewrite I can advance to larger block sizes.
replies(1): >>45688906 #
25. rezonant ◴[] No.45688592{6}[source]
What's the best hardware for running a /dev/null instance for production?
replies(2): >>45688994 #>>45689263 #
26. hmokiguess ◴[] No.45688624[source]
I guess it is also idempotent then
27. qwertox ◴[] No.45688631{4}[source]
Amen.
28. gchamonlive ◴[] No.45688632[source]
Best stack cloud providers don't want you to know about, /dev/null for db and https://github.com/kelseyhightower/nocode for the backend.
replies(2): >>45688742 #>>45689108 #
29. gucci-on-fleek ◴[] No.45688712{4}[source]
> I can’t ever remember seeing a bug in either bash

Shellshock [0] is a rather famous example, but bugs like that are rare enough that they make the news when they're found.

[0] https://en.wikipedia.org/wiki/Shellshock_%28software_bug%29

30. charcircuit ◴[] No.45688714[source]
/dev/null is not a database. By this logic is a hard disk a database, is a CD a database. No. They are storage mediums. You could store a database on them, but they themselves are not a database.

Considering there is no way to read back data written to /dev/null it will not be useful for storing database data.

replies(3): >>45688749 #>>45689087 #>>45689165 #
31. ◴[] No.45688734[source]
32. quietbritishjim ◴[] No.45688742[source]
WTF is going on with the issues and pull requests for that repo?
replies(6): >>45688769 #>>45688814 #>>45688954 #>>45689006 #>>45689879 #>>45690124 #
33. ◴[] No.45688749[source]
34. gchamonlive ◴[] No.45688769{3}[source]
In nocode you fix nothing and you don't change anything, that's why issues and pull requests are a mess, they literally cannot be dealt with by design.
35. fennec-posix ◴[] No.45688814{3}[source]
Had to see for myself, and yeah... that's a whole lot of chaos. I'm sure I'd get the joke if I could read Chinese though.
replies(1): >>45690032 #
36. ◴[] No.45688856[source]
37. doublerabbit ◴[] No.45688894[source]
Idea: NaaS. Null as a service.
38. fukka42 ◴[] No.45688906{7}[source]
Interestingly I tried this as well and was disappointed with the results:

  yes $(printf %1024s | tr " " "y") | pv > /dev/null
About the same throughput as letting yes output a single character. I guess Unix pipes are slow.
replies(1): >>45689193 #
39. SanjayMehta ◴[] No.45688954{3}[source]
They're using it to communicate in code to each other.
replies(1): >>45688995 #
40. SanjayMehta ◴[] No.45688959{3}[source]
False.

Wait: that's just not true.

Carry on.

41. epistasis ◴[] No.45688994{7}[source]
I usually do a kubernetes cluster on top of VMs. But sometimes when I really want to scale the standard cloud server less platforms all support /dev/null out of the box. (Except for Windows...)
replies(1): >>45689660 #
42. QuantumNomad_ ◴[] No.45688995{4}[source]
Well they should stop that and start communicating in nocode instead.
43. sundarurfriend ◴[] No.45689006{3}[source]
The less substance there is to it, the easier it is to talk about.

The Chinese comments ("issues") also seem to be the same kind of jokes as the English ones, "no code means no bugs, perfect", etc., from the few I tried getting translations of. I imagine this went viral on Chinese social media, which makes sense since it's the sort of joke that's easy to translate and doesn't depend on particular cultural assumptions or anything.

44. PokestarFan ◴[] No.45689009{4}[source]
I've been able to trigger a segfault in zsh with certain plugins, a directory with a lot of files/folders, and globs with a bunch of * characters.
45. 1970-01-01 ◴[] No.45689018[source]
So if you could somehow get something stuck in /dev/null would it cause a panic or what happens?
46. idontwantthis ◴[] No.45689082[source]
This reminds me of how I would write a HashCode implementation on intro CS exams in college:

‘return 5’

47. chrisweekly ◴[] No.45689087[source]
seems you've missed the joke
replies(1): >>45689148 #
48. nomel ◴[] No.45689108[source]
I've never had a single issue with any user after moving our databases to /dev/null.
replies(1): >>45689758 #
49. charcircuit ◴[] No.45689148{3}[source]
It's not a funny one if it was one. Of course something is going to be a bad database if it's not a database.
replies(3): >>45689483 #>>45689572 #>>45689796 #
50. jonathrg ◴[] No.45689165[source]
You can store any data as long as it doesn't contain any ones
replies(1): >>45689971 #
51. 1718627440 ◴[] No.45689182{4}[source]
Programs not outputting a final newline to stdout leave a prompt that doesn't start on column 0, and readline seams to not takes this into consideration, but still optimizes redraws and overwrites so you get an inconsistent display. This bugs seam to exist in a lot of shells and interactive programs. The program causing the issue isn't POSIX conform though.
replies(1): >>45689424 #
52. 1718627440 ◴[] No.45689193{8}[source]
> I guess Unix pipes are slow.

Or string concatenation, or pipeviewer.

replies(2): >>45689287 #>>45690060 #
53. keithnz ◴[] No.45689253[source]
took a while to pipe my multi-terabyte db to /dev/null but now that I have I'm saving a ton of money on storage.
54. __turbobrew__ ◴[] No.45689263{7}[source]
A single resistor at ground voltage.
replies(1): >>45690063 #
55. fukka42 ◴[] No.45689287{9}[source]
yes doesn't do string concatenation, at least not in the loop that matters. It just prepares a buffer of bytes once and writes it to stdout repeatedly.

https://github.com/coreutils/coreutils/blob/master/src/yes.c

56. jefftk ◴[] No.45689295[source]
"The system transitions from one valid state to another" is clearly false: the system only has a single state.
replies(1): >>45689928 #
57. layer8 ◴[] No.45689307[source]
Not on Windows.
58. tech234a ◴[] No.45689318[source]
This reminds me of the S4 storage service: http://www.supersimplestorageservice.com/

Discussed on HN a few times, but apparently not for a few years now: https://hn.algolia.com/?q=http%3A%2F%2Fwww.supersimplestorag...

59. inopinatus ◴[] No.45689353[source]
Enterprise DBAs will nevertheless provision separate /dev/null0 and /dev/null1 devices due to corporate policy. In the event of an outage, the symlink from null will be updated manually following an approved run book. Please note that this runbook must be revalidated annually as part of the sarbox audit, without which the null device is no longer authorised for production use and must be deleted
60. johnfn ◴[] No.45689401[source]
Not only that, it provides all 3 components of CAP!
replies(1): >>45689431 #
61. bitwize ◴[] No.45689405[source]
Yes, but does it support sharding? Sharding is the secret ingredient in the web scale sauce.
62. latexr ◴[] No.45689424{5}[source]
> seams

The correct spelling is “seems”. I first assumed it was a typo, but since you did it twice I thought you might like to know.

63. _joel ◴[] No.45689431[source]
The Jespsen tests pass quickly too!
64. voidfunc ◴[] No.45689483{4}[source]
"Its not funny" says the one guy in a room where literally everyone else is laughing and riffing on the joke.

Your humor unit might be defective.

replies(1): >>45689677 #
65. mjb ◴[] No.45689517[source]
Best of all, /dev/null is also serializable (but not strict serializable) under many academic and textbook definitions.

Specifically, these definitions require that transactions appear to execute in some serial order, and place no constraints on that serial order. So the database can issue all reads at time zero, returning empty results, and all writes at the time they happen (because who the hell cares?).

The lesson? Demand real-time guarantees.

replies(1): >>45689600 #
66. theandrewbailey ◴[] No.45689558[source]
/dev/null is the ultimate storageless function. It's like serverless, but for PII, and deployable anywhere!
67. brobbin ◴[] No.45689572{4}[source]
It's nerd humor. You're not supposed to find it funny, but nod along approvingly while noticing how awfully clever you are for noticing the attempt at being funny.
68. BiraIgnacio ◴[] No.45689576[source]
A strong business opportunity right there.
69. mjb ◴[] No.45689600[source]
This doesn't work as cleanly for SQL-style transactions where there are tons of RW transactions, sadly.
70. wowczarek ◴[] No.45689660{8}[source]
> Except for Windows...

copy c:\file nul

It's been there since DOS or more likely CP/M :)

replies(1): >>45690314 #
71. jihadjihad ◴[] No.45689668[source]
In a similar vein, this is one of the most interesting things I’ve come across on HN over the years:

https://www.linusakesson.net/programming/pipelogic/index.php

Past HN post: https://news.ycombinator.com/item?id=15363029

72. PlunderBunny ◴[] No.45689758{3}[source]
Did you route the support requests to /dev/null as well?
replies(2): >>45690072 #>>45690517 #
73. jfengel ◴[] No.45689796{4}[source]
It's not a great joke, to be sure. But the essence of it is that it's a good database, by relevant but inappropriate standards.
74. rkeene2 ◴[] No.45689808{4}[source]
I had a fun bug where bash would run scripts out of order!

This would lead to impossible states, like

if cat foo | false; then echo hmm; fi

Producing output sometimes, depending on whether or not `cat foo` or `false` return value was used

[0] https://lists.gnu.org/archive/html/bug-bash/2015-06/msg00010...

75. thelastgallon ◴[] No.45689879{3}[source]
Looks like the code for MCP support is reviewed and merged: https://github.com/kelseyhightower/nocode/pull/5540
76. AdieuToLogic ◴[] No.45689909{4}[source]
> Joking aside I can’t ever remember seeing a bug in either bash or zsh, never seen either crash or segfault and anytime I’ve had weirdness it’s always turned out to be me missing something.

Given that this statement begins with "joking aside", I have to assume it is either a meta-joke or an uninformed opinion. Taking the subsequent sentence into account thoroughly reinforces the former.

Well played. :-)

77. mpyne ◴[] No.45689928[source]
One of the first state machine you'll ever learn about in undergrad permits transitions from a state back to itself, so I don't see this as a barrier.
replies(1): >>45690050 #
78. mpyne ◴[] No.45689949[source]

    sudo mknod /dev/null c 1 3 && sudo chmod 666 /dev/null
might do it on many systems
79. saltcured ◴[] No.45689971{3}[source]
And, you don't depend on it remembering how many zeros you wrote last.
80. blourvim ◴[] No.45689987[source]
I love this
81. dheera ◴[] No.45690003[source]
I guess /dev/null is also an excellent source of investment advice, you are guaranteed to not lose money
82. eru ◴[] No.45690032{4}[source]
Ask Google Translate?
83. eru ◴[] No.45690041[source]
Not just instantly consistent on one machine, but globally sharded all across the universe.
84. eru ◴[] No.45690050{3}[source]
And you can implement /dev/null with multiple states, as long as you make them all behave the same way.
85. eru ◴[] No.45690060{9}[source]
Compare https://codegolf.stackexchange.com/questions/199528/fastest-...
86. eru ◴[] No.45690063{8}[source]
That doesn't support expected features like 'stat /dev/null'.
87. lgas ◴[] No.45690072{4}[source]
This is how a lot of big tech companies scale support.
88. yuppiemephisto ◴[] No.45690119[source]
And the axiom of empty set is an inaccessible cardinal axiom
89. geoffbp ◴[] No.45690121[source]
Is there a case where dev null can fail?
90. gchamonlive ◴[] No.45690124{3}[source]
This commit is interesting, it used to support /dev/null natively, but for the sake of supporting windows you now have to use /dev/null externally by writing nothing at all

https://github.com/kelseyhightower/nocode/commit/80f38e0f103...

91. hshdhdhehd ◴[] No.45690147[source]
It is also local first, low latency, data residency compliant, SOC2 compliant, zero dependency and webscale.
92. MartijnBraam ◴[] No.45690296{3}[source]
Ah you've never encountered /dev/null not existing yet, so when you try to trash data it will actually create a normal file there so every other program that uses it will actually append that file.

Luckily it's usually a tmpfs

93. epistasis ◴[] No.45690314{9}[source]
Still need an adapter library though! Fortunately there are about 7 competing implementations on npm and most of them only have 5-6 transitive dependencies.
94. justinhj ◴[] No.45690510[source]
Add an mcp server and I'm in
95. soraminazuki ◴[] No.45690517{4}[source]
Haha, I guess support.google.com is an ACID compliant database as well.