romange / helio

A modern framework for backend development based on io_uring Linux interface
Apache License 2.0
447 stars 50 forks source link

extend DnsResolve to support ipv6 #245

Closed romange closed 7 months ago

romange commented 7 months ago

Some environments do not rely on DNS servers for dns resolution. It seems that we do not support this case.

Expected: /etc/hosts would be taken into account.

a few leads to investigate:

Seems that the first option would be a cleaner solution.

romange commented 7 months ago

@dranikpg update: the problem seems to be related to binding ipv6 network interface and not to /etc/hosts. to reproduce:

  1. ./dragonfly --logtostderr --bind ::1 --port 6379
  2. ./dragonfly --logtostderr --bind ::1 --port 6380
  3. redis-cli -h ::1 -p 6380
    [::1]:6380> replicaof ::1 6379
    (error) ERR could not resolve master dnsNo route to host

    the problem started with v1.16 because we switched to DnsResolve in replication

dranikpg commented 7 months ago

Closed with #247