You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
agis
changed the title
pubsub: Publish latency spikes
pubsub: Publish latency spikes (low-throughput usecase)
Jan 14, 2025
agis
changed the title
pubsub: Publish latency spikes (low-throughput usecase)
pubsub: Publish latency spikes in certain messages (low throughput publisher)
Jan 14, 2025
Could you show more of the code, specifically on how the topic object is passed around? Historically an issue of higher latency and Cloud Run (or Cloud Functions) is that the object isn't properly cached.
We have a thin client wrapper, which keeps a reference to the created topic. We use that same reference throughout the code, and we initialize the client once in our main, so I believe we do use it as intented.
Client
Environment
Cloud Run
go 1.23.4
Code and Dependencies
Expected behavior
We expect all messages to be published within 100ms.
Actual behavior
We have a few outliers: while most messages are published within 20ms, a few of them take up to 5s.
Screenshots
The following are traces from Datadog, gathered via https://github.com/DataDog/dd-trace-go/tree/main/contrib/cloud.google.com/go/pubsub.v1:
This is consistent with what GCP's
topic.send_request_latencies.avg
reports, pretty much the same time:Additional context
The text was updated successfully, but these errors were encountered: