Hi,
I have a headless k8s service for which the local DNS resolver gives all the IPs of the pods sitting behind the service. The requests made to the service are not getting load balanced with go1.22.7 and all the requests go to a single pod. The HTTP client is invoked using the following snippet:
```
for {
client := &http.Client{
Timeout: 95 * time.Second,
}
req, err := http.NewRequest("GET", "http://<service-name>:<port>", nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making request:", err)
return
}
defer resp.Body.Close()
time.Sleep(5 * time.Second)
}
```
Requests made from the above with go1.23.1 are getting load balanced appropriately(not sure if it’s round robin though). I compared the transport logic for both the versions but couldn’t find anything concrete which could cause this problem. Can you experts please help me out?
Thanks,
Nishant