I'm currently managing multiple GCP subscribers connected to a single GCP subscription, but despite numerous attempts at optimization, the subscribers consistently fail to keep up with the incoming message rate. Here's an overview of my latest setup:
Infrastructure:
i) 25 AWS ECS instances (each with 1 vCPU and 1GB RAM) running C# GCP subscribers using Streaming Pull with high level client library.
ii) Approximately 100 streaming pull connections (according to GCP metrics).
GCP Subscription:
i) Message Retention: 10 minutes
ii) Expiration policy: 1 day
iii) AckDeadline: 600s
iv) EnableExactlyOnceDelivery: false
GCP Subscriber:
i) AckDeadline: 600s
ii) AckExtensionWindow: 590s
iii) FlowControl - maxMessageCount: 5000, maxOutstandingByteCount: 5000 * 700
According to AWS ECS metrics, combined network throughput across all 25 instances averages around 600โ700 kbps, with occasional peaks up to 2 Mbps.
I was under the impression that the streaming pull client supports 10 Mbps per client, yet Iโm seeing far lower throughput across all instances.
Scaling up to 75 instances didnโt improve throughput or reduce message backlog.
The topic's publish rate is approximately 20,000 messages per second, but even with acking without doing anything with messages, the subscribers canโt handle that rate.
GCP Pub/Sub metrics show frequent modifyAckDeadline calls, but there are no expired messages.
I've also tried using default settings with similar results. The dashboard reports an average acknowledgment latency of 25ms, and the ack rate closely matches the message send rate.
Given the current setup and performance data, how can I configure or optimize my subscribers to handle the input rate of 20k messages per second more effectively?
Any insights or suggestions would be greatly appreciated. Thanks in advance!
Hi @amsh,
Welcome to Google Cloud Community!
Check the list below for possible solutions to the issue:
If the issue persists, please contact Google Cloud Support. When reaching out, include detailed information and relevant screenshots of the errors youโve encountered. This will assist them in diagnosing and resolving your issue more efficiently.
Was this helpful? If so, please accept this answer as โSolutionโ. If you need additional assistance, reply here within 2 business days and Iโll be happy to help.