On Wed, 31 Mar 2021 01:47:43 -0700 (PDT) Jonathan Hedrén <jonathan.hed...@gmail.com> wrote:
> I've set up a development environment on my MacBook Pro M1 (running > Big Sur 11.2.3, Go 1.16.2) with a number of small Go/.Net HTTP APIs > that are communication with each other. To replicate our production > infrastructure I've set up /etc/hosts with ".local" domains pointing > to 127.0.0.1. An nginx server then proxies the requests to the APIs. > A self signed certificate is used for https. > > Whenever an HTTP request is sent from a Go application to any of the > ".local" APIs, 5 seconds are added to the response time. This delay > is not added when I use a browser to make the request, neither if I > call an external address (for example google.com) or "localhost" from > the Go code. It only happens when I use http.Client to request a > ".local" domain and the behavior is consistent. > > I've searched the Go standard library for a "5 * time.Second" and > found it only in a few places, including src/net/dnsconfig_unix.go so > I guess it's related to the name resolution. > > Anyone got an idea about what's wrong and how it can be fixed? > > /Jonathan > Previous discussion on this subject: https://groups.google.com/g/golang-nuts/c/BuMYgqMCw8I/m/pIAhmNIWBQAJ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20210401123914.6e6db5df%40inspiro.shul.localdomain.
pgpUFxMeFeNxG.pgp
Description: OpenPGP digital signature