Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    272comments
  2. The Contract on America(3quarksdaily.com ↗)
    2comments
  3. Cloudflare Quick Tunnels(cloudflare.com ↗)
    254comments
  4. Science Is Open Software(jepedersen.dk ↗)
    2comments
  5. Saving another 100TB of RAM(cloudflare.com ↗)
    47comments
  6. How to Write with an LLM(sockpuppet.org ↗)
    277comments
  7. The Farnese letter(simonklee.dk ↗)
    5comments
  8. Xcode 27.1 Beta Release Notes(developer.apple.com ↗)
    68comments
  9. Show HN: LiveWorld – Every 24/7 YouTube live camera on one globe(liveworld.info ↗)
    12comments
  10. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    55comments
  11. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    78comments
  12. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    64comments
  13. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    12comments
  14. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    60comments
  15. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    discuss
  16. OpenJev(openjev.com ↗)
    247comments
  17. Claude Code now reads AGENTS.md if there is no Claude.md(claude.com ↗)
    188comments
  18. Cyclomatic Complexity in C#(ndepend.com ↗)
    15comments
  19. LispBM is a concurrent Lisp for microcontrollers with message passing(lispbm.com ↗)
    1comments
  20. Minimal Phone 2(minimalcompany.com ↗)
    187comments
  21. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    31comments
  22. Two parallel neural ectoderm progenitors contribute to the developing brain(newscientist.com ↗)
    59comments
  23. The Implications of Linguistic Illegibility for LLM Security(arxiv.org ↗)
    20comments
  24. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    93comments
  25. C++26: Trivial infinite loops are no longer undefined behaviour(sandordargo.com ↗)
    206comments
  26. How SpaceX streamlined the Raptor engine(construction-physics.com ↗)
    43comments
  27. Alibaba open-sources AI model that can detect cancer and nearly 150 conditions(scmp.com ↗)
    5comments
  28. Column built an issuer processor from scratch(column.com ↗)
    6comments
  29. Size-Specialized Memory Allocation(go.dev ↗)
    3comments
  30. A search-and-inference database from scratch in pure Zig(antfly.io ↗)
    16comments

DNS Key Value Storage

139 pointsby 5y agodnskv.com
32 comments
5y agoHN ↗

Cool toy:

    ;; ANSWER SECTION:
    pressbutton.dnskv.com. 604740 IN TXT "nannal"

I played around with something similar on my domain, using DoH to fetch txt values for page modification .

     dig TXT nannal.com|grep status

Plan was to grab that, pipe it into a JS switch statement and then change some CSS values based on the value.

5y agoHN ↗

You'd think DNS KV Store's a "nice figment of imagination", but one of the teams I worked for did use DNS TXT records genuinely as a (faster) way to reconcile state between the control plane and the data plane.

It sounded ugly on-paper, but the design was approved by everyone in the chain of command for what I presume was for lack of other viable options given the architecture.

And in ironic turn of events, instead of using DNS for service discovery, another set of engineers in the team opted for EC2 metadata (for example, security groups) instead.

5y agoHN ↗

I did something similar (for personal use) for a sort of 'peer discovery' where load balancing didn't actually matter, I just wanted to pick one of N without knowing where they are ahead of time, using IPVS: https://github.com/OJFord/ipvs-txt-lb

To be honest I'm not sure if it's a total hack or a reasonable use as intended, or somewhere in between. But it got it done, and is at least more elegant than hard coding something arbitrary which may change (just not too frequently), I think.

5y agoHN ↗

DNS SRV records seem appropriate for that.

5y agoHN ↗

Using TXT records for this kind of thing is not that unusual. For example, Kubernetes's external-dns uses TXT records to track which entries it manages.

5y agoHN ↗

I've used the AWS metadata trick as well. I kind of liked the solution; better use something that the machine is already relying on than adding something extra.

DNS is also usually a much better option than the framework-specific service discovery mechanism that every framework seems to be destined to reinvent. I think the problem is that most computer scientists aren't very well-versed in networking, and DNS doesn't look like the best match at first glance.

5y agoHN ↗

I've done the same - tag EBS volumes with metadata rather than having to maintain a separate datastore for a tiny amount of information. Worked well.

5y agoHN ↗

It should not be surprising to anyone that long-established protocol standards are capable and versatile. DNS and LDAP are robust tree-structured replicated attribute stores; mix in Kerberos for a complete foundation of general purpose directory services. NNTP supplies a straightforward Gossip protocol for eventually-consistent distributed pub/sub. MQTT is still good for lightweight telemetry. I have services I authenticate with via Lamport's mostly forgotten scheme (S/KEY). And so on.

There is a current fad of HTTP+JSON as a generic protocol substrate, but it's almost always a mediocre fit for the problem at hand. Go read the RFC archives, there's diamonds to be found.

On the other hand, and perhaps even by the same token: using EC2 metadata isn't a completely terrible idea if it's the infrastructure you already have and the semantics line up with specific needs.

5y agoHN ↗

There is still Hesiod support in GlibC / NSS, etc on most modern systems. When put together with Kerberos it's a nice way to provision auth on lots of machines automatically.

It's nice to have a dedicated and restricted resolver config so that the zone visibility can be restricted but that makes deployment a little more complex.

5y agoHN ↗

+100 for use Hesiod. It solved this problem well and correctly years ago, and just works. (It was also a key part of the support for Carnegie-Mellon's Andrew networked filesystem.)

The seamless integration of all the Project Athena stuff (Hesiod, Kerberos, etc.) with DEC Ultrix is one of many reasons that Ultrix is still, IMO, the greatest Unix/;Unix-like distro in history.

5y agoHN ↗

and of course the venerable NIS / yp lived parallel to DNS in most organizations.

5y agoHN ↗

With AWS Route 53's 10 000 records/zone, 400 values/record 255 chars/TXT and base64's ~35% overhead, you have a bit over 600 megabytes of binary value storage.

5y agoHN ↗

I don’t understand this:

  A, AAAA, TXT - set record

  A, AAAA - check key

  TXT - read value

Dynamic DNS supports all of these options directly. Why are additional records used for the key and value? IXFR could instead be used to check if a record is up-to-date rather than overloading A and AAAA in their meaning?

I’m probably missing something about how these records are meant to be used together. Is there a protocol doc available?

5y agoHN ↗

I can't find any docs other than what's on the page but my reading suggests that the idea is that you can get/set values "in-band" using a regular lookup query to a resolver rather than the nsupdate style that you'd normally use to remotely configure zones.

5y agoHN ↗

The page says:

    Insert:
    · value.key.

So if you

    $ dig txt value.key.dnskv.com

you will receive an "ok" if setting key=value succeeded. Then if you

    $ dig txt key.dnskv.com

you will get the answer "value".

Read more of the page to find out what else you can do.

5y agoHN ↗

thanks, the docs could be more verbose. for those who don't know how does the updating work:

  dig txt u[update-secret].value.key.dnskv.com # set for first time
  dig txt u[update-secret].new-value.key.dnskv.com # use the same update secret, noone can now use this key without it until expiry

also helps to add

  dig @ns.dnskv.com. txt ... 

to prevent caching or what it's called in DNS

5y agoHN ↗

I interpreted this as:

insert with any type of query to value.key.dnskv.com

check if key is set with A or AAAA query to key.dnskv.com

read value of key with TXT query to key.dnskv.com

5y agoHN ↗

Oh the Route 53 team had the same half joke as well. DNS really is a good match for fast globally distributed reads and slowish writes to a hierarchal k/v store. Lots of customers have figured this out to better (or worse) effect.

Source: Principal at AWS, worked on route 53 for a few years.

5y agoHN ↗

* DNS really is a good match for fast globally distributed reads and slowish writes to a hierarchal k/v store*

sounds like another good candidate for distributed TimeSeries DB or DHT type of things.

5y agoHN ↗

I don't get what the problem is. He used DNS as a name server, which is what it is. The only weird thing is TXT instead of CNAME.

5y agoHN ↗

I tend to like Cloudflare's API for key/value storage.

If you don't delete the record, the key will always have the same id-number, so you never need more than a single API call to reference a value or change it.

5y agoHN ↗

We used (route 53) private DNS records for feature toggles in my previous company; worked better than most of the other solutions tbh.

5y agoHN ↗

DNS is actually pretty nice for ACL [1]. Just make sure you use it with DNSSEC.

Want to check if Tom has access to /web/mike? Just do a lookup on the user in question with the reversed path you want to check.

"Can Tom read /web/mike?" => tom.mike.web.server.net

Advantages:

- Replication to multiple machines is trivial (piggybacking of DNS, after all).

- Lookups are fast. Can also be easily cached.

- All sane programming languages have built-in DNS resolution in their stdlib out-of-the-box.

- Manual override using /etc/hosts for debugging/emergency.

1. https://itk.samfundet.no/dok/ITKACL2

5y agoHN ↗

I love hacks for DNS, but this one feels a little bit of a stretch. The absolute lack of security is probably the biggest one. Now one can troll DNS for a user who has access to a resource.

5y agoHN ↗

Doesn't necessarily have to be public dns. Could be internal to just your servers...

5y agoHN ↗

Authentication != Authorisation.

You wouldn't use this to determine if the user really is who he says he is. But in determining what a user has access to, DNS is pretty slick. The DNS server doesn't need to be public either.

5y agoHN ↗

I can't remember the name of the Resource Record type now, but I discovered a historical/obsolete RR a while back that was designed for storing structured data in the DNS.

The data for the RR was a series of key=value pairs.

IIRC it would look something like this in a zone file...

foo TYPE "foo=bar" "baz=qux"

5y agoHN ↗

What is the option 'd to pass a custom domain key'? What is a domain key?