Skip to content

PubSub: High volume of DNS failures to _grpc_config.pubsub.googleapis.com / _grpclb._tcp.pubsub.googleapis.com. #2404

@rdsubhas

Description

@rdsubhas

We are seeing a high volume of DNS lookup failures to _grpc_config.pubsub.googleapis.com. and _grpclb._tcp.pubsub.googleapis.com. when using the pubsub library.

Environment details

  1. PubSub
  2. Linux, container-os (Google Kubernetes Engine)
  3. Java version: 17
  4. com.google.cloud:google-cloud-pubsub library version: 1.138.0

Steps to reproduce

  1. Instantiate PubSub client
  2. It makes failing NXDOMAIN DNS lookups to _grpc_config.pubsub.googleapis.com. and _grpclb._tcp.pubsub.googleapis.com.

Code example

String projectId = "your-project-id-here"; // I used a test project
String topicId = "your-topic-id-here"; // I used a test topic
TopicName topicName = TopicName.of(projectId, topicId);
Publisher publisher = Publisher.newBuilder(topicName).build();

String message = "Hello World!";
PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(ByteString.copyFromUtf8(message)).build();

publisher.publish(pubsubMessage);

Run this by setting Log Level to FINEST:

# logging.properties
.level = FINEST
handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
io.grpc.level=FINEST
com.google.cloud.pubsub.level = FINEST

# Run the example by setting this system variable
-Djava.util.logging.config.file=.../logging.properties

We can see in the output:

[2025-04-30 12:01:03] [FINER  ] About to query SRV records for _grpclb._tcp.pubsub.googleapis.com
[2025-04-30 12:01:04] [FINE   ] SRV lookup failure
[2025-04-30 12:01:04] [FINER  ] About to query TXT records for _grpc_config.pubsub.googleapis.com
[2025-04-30 12:01:04] [FINE   ] ServiceConfig resolution failure
[2025-04-30 12:01:04] [FINE   ] No TXT records found for pubsub.googleapis.com

This repeats tons of times through the course of the application's lifecycle. We see 22000 DNS failures a day on average.

What is expected

  • The official google libraries are configured out of the box correctly
  • or there is a way to turn off this behavior and not create DNS error noise

External references such as API reference guides

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/java-pubsub API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions