Skip to content

Conversation

kishor7007
Copy link
Contributor

@kishor7007 kishor7007 commented Aug 19, 2025

Implementation for #40696

Currently dns response size is 1232 on UDP support as per c-ares lib(https://github.com/c-ares/c-ares/blob/main/src/lib/ares_private.h#L133) on EDNS0. we can provide the option via envoy filters to customise the size as per end user needs like 4096, etc.
[optional Relevant Links:]

Any extra documentation required to understand the issue.
https://datatracker.ietf.org/doc/html/rfc6891

Sample Service Entry for testing:

apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  name: external-svc-https
spec:
  hosts:
  - example.com
  location: MESH_EXTERNAL
  ports:
  - number: 443
    name: https
    protocol: TLS
  resolution: DNS

Sample Envoy filter tested with:

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: dns-edns0-config
  namespace: istio-system
spec:
  configPatches:
  - applyTo: CLUSTER
    patch:
      operation: MERGE
      value:
        typed_dns_resolver_config:
          name: envoy.network.dns_resolver.cares
          typed_config:
            "@type": type.googleapis.com/envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig
            edns0_max_payload_size: 4096

Test Results:
============Before applying the envoy filter (UDP truncate, TCP retry)==================

Aug 19, 2025 11:41:01.806071736 UTC 1268 sll:ethertype:ip:udp:dns 17 192.168.1.101,192.168.1.102,192.168.1.103,192.168.1.104,192.168.1.105,192.168.1.106,192.168.1.107,192.168.1.108,192.168.1.109,192.168.1.110,192.168.1.111,192.168.1.112,192.168.1.113,192.168.1.114,192.168.2.195,192.168.2.196,192.168.2.197,192.168.2.198,192.168.2.199,192.168.2.200,192.168.2.201,192.168.2.202,192.168.3.101,192.168.3.102,192.168.3.103,192.168.3.104,192.168.3.105,192.168.3.106,192.168.3.107,192.168.3.108,192.168.3.109,192.168.3.110,192.168.3.111,192.168.3.112,192.168.3.113,192.168.3.114,192.168.3.195,192.168.3.196,192.168.3.197,192.168.3.198,192.168.3.199,192.168.3.200,192.168.4.101,192.168.4.102,192.168.4.103,192.168.4.104,192.168.4.105,192.168.4.106,192.168.4.107,192.168.4.108,192.168.4.109,192.168.4.110,192.168.4.111,192.168.4.112,192.168.4.113,192.168.4.114,192.168.4.195,192.168.5.101,192.168.5.102,192.168.5.103,192.168.5.104,192.168.5.105,192.168.5.106,192.168.5.107,192.168.5.108,192.168.5.109,192.168.5.110,192.168.5.111,192.168.5.112,192.168.5.113,192.168.5.114,192.168.5.195,192.168.6.101,192.168.6.102

Aug 19, 2025 11:41:01.806637942 UTC 2459 sll:ethertype:ip:tcp:dns 6 192.168.1.101,192.168.1.102,192.168.1.103,192.168.1.104,192.168.1.105,192.168.1.106,192.168.1.107,192.168.1.108,192.168.1.109,192.168.1.110,192.168.1.111,192.168.1.112,192.168.1.113,192.168.1.114,192.168.2.195,192.168.2.196,192.168.2.197,192.168.2.198,192.168.2.199,192.168.2.200,192.168.2.201,192.168.2.202,192.168.3.101,192.168.3.102,192.168.3.103,192.168.3.104,192.168.3.105,192.168.3.106,192.168.3.107,192.168.3.108,192.168.3.109,192.168.3.110,192.168.3.111,192.168.3.112,192.168.3.113,192.168.3.114,192.168.3.195,192.168.3.196,192.168.3.197,192.168.3.198,192.168.3.199,192.168.3.200,192.168.4.101,192.168.4.102,192.168.4.103,192.168.4.104,192.168.4.105,192.168.4.106,192.168.4.107,192.168.4.108,192.168.4.109,192.168.4.110,192.168.4.111,192.168.4.112,192.168.4.113,192.168.4.114,192.168.4.195,192.168.5.101,192.168.5.102,192.168.5.103,192.168.5.104,192.168.5.105,192.168.5.106,192.168.5.107,192.168.5.108,192.168.5.109,192.168.5.110,192.168.5.111,192.168.5.112,192.168.5.113,192.168.5.114,192.168.5.195,192.168.6.101,192.168.6.102,192.168.6.103,192.168.6.104,192.168.6.105,192.168.6.106,192.168.6.107,192.168.6.108,192.168.6.109,192.168.6.110,192.168.6.111,192.168.6.112,192.168.6.113,192.168.6.114,192.168.6.195

               =============After applying the envoy filter(whole response in UDP)=============

Aug 19, 2025 11:39:45.315502503 UTC 1476 sll:ethertype:ip:udp:dns 17 192.168.1.101,192.168.1.102,192.168.1.103,192.168.1.104,192.168.1.105,192.168.1.106,192.168.1.107,192.168.1.108,192.168.1.109,192.168.1.110,192.168.1.111,192.168.1.112,192.168.1.113,192.168.1.114,192.168.2.195,192.168.2.196,192.168.2.197,192.168.2.198,192.168.2.199,192.168.2.200,192.168.2.201,192.168.2.202,192.168.3.101,192.168.3.102,192.168.3.103,192.168.3.104,192.168.3.105,192.168.3.106,192.168.3.107,192.168.3.108,192.168.3.109,192.168.3.110,192.168.3.111,192.168.3.112,192.168.3.113,192.168.3.114,192.168.3.195,192.168.3.196,192.168.3.197,192.168.3.198,192.168.3.199,192.168.3.200,192.168.4.101,192.168.4.102,192.168.4.103,192.168.4.104,192.168.4.105,192.168.4.106,192.168.4.107,192.168.4.108,192.168.4.109,192.168.4.110,192.168.4.111,192.168.4.112,192.168.4.113,192.168.4.114,192.168.4.195,192.168.5.101,192.168.5.102,192.168.5.103,192.168.5.104,192.168.5.105,192.168.5.106,192.168.5.107,192.168.5.108,192.168.5.109,192.168.5.110,192.168.5.111,192.168.5.112,192.168.5.113,192.168.5.114,192.168.5.195,192.168.6.101,192.168.6.102,192.168.6.103,192.168.6.104,192.168.6.105,192.168.6.106,192.168.6.107,192.168.6.108,192.168.6.109,192.168.6.110,192.168.6.111,192.168.6.112,192.168.6.113,192.168.6.114,192.168.6.195

Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @markdroth
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #40776 was opened by kishor7007.

see: more, trace.

@markdroth
Copy link
Contributor

/lgtm api

@kishor7007
Copy link
Contributor Author

@markdroth , @yanavlasov ,
If you get a chance, could you please review?

@markdroth
Copy link
Contributor

/lgtm api

@kishor7007
Copy link
Contributor Author

@yanavlasov, gentle reminder

@yanavlasov yanavlasov merged commit a0c8340 into envoyproxy:main Aug 27, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants