How a tcpdump led us to a bug in Node's IPv6 handling
The Node.js runtime doesn't implement the Happy Eyeballs algorithm for web requests by default, which can lead to issues when a server has a broken IPv6 address that responds first. This was discovered during testing of the Checkly Coralogix integration, where users in the US-East-1 region were experiencing failures due to the Node.js runtime's preference for IPv4 over IPv6. The issue was traced back to an unexpected behavior in Node.js 18 and earlier versions, which look up both IPv4 and IPv6 numbers separately and prefer the first one that responds. This can lead to issues when the faster of the two connections isn't returned, as the slower one will be used instead. The problem was solved by configuring requests to prioritize IPv6 over IPv4, which is now supported in the API checks of Checkly.
Company
Checkly
Date published
Sept. 5, 2024
Author(s)
Umut Uzgur, Nočnica Mellifera
Word count
1365
Language
English
Hacker News points
5