Posts

Showing posts from February, 2015

IPv6 and IPv4 name resolution with Go

As part of a work-related project, I'm writing code that needs to resolve DNS names using Go , on illumos . While doing this work, I noticed a very surprising thing.  When a host has both IPv6 and IPv4 addresses associated with a name (such as localhost ), Go prefers to resolve to the IPv4 version of the name, unless one has asked specifically for v6 names. This flies in the fact of existing practice on illumos & Solaris systems, where resolving a name tends to give an IPv6 result, assuming that any IPv6 address is plumbed on the system.  (And on modern installations, that is the default -- at least the loopback interface of ::1 is always plumbed by default.  And not only that, but services listening on that address will automatically serve up both v6 and v4 clients that connect on either ::1 or 127.0.0.1.) The rationale for this logic is buried in the Go net/ipsock.go file, in comments for the function firstFavoriteAddr  () : 76 // We'll take any IP address

Rise of mangos

What is mangos? Those of you who follow me may have heard about this project I've created called mangos . Mangos is a lightweight messaging system designed to be wire compatible with nanomsg , but is implemented entirely in Go . There is a very nice write up of mangos by Tyler Treat, which might help explain some things. Recent Activity As a consequence of a few things, the last two weeks has seen a substantial rise of use of mangos. First off, there was Tyler's excellent article.  (By the way, he's done a series comparing and contrasting other messaging systems -- highly recommended reading.) Second, mangos got mentioned on Hacker News .  That drew a large number visitors to my github repo. Then another open source project, Goq , switched from using libnanomsg to mangos, using the compatibility shim I provided for such use.  As a consequence of that work, several bugs were identified, and subsequently squashed. The upshot of all that is that I saw the