Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pub/Sub: Reduce default publisher batch.maxMilliseconds from 1000 to 100 #96

Closed
kir-titievsky opened this issue Mar 14, 2018 · 0 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. perf type: enhancement

Comments

@kir-titievsky
Copy link

A customer reported excessive Publish latency on Pub/Sub: consistently over 1 second. On closer inspection, it turned out that the user intended to publish one messages at a time, each from its own invocation of a Cloud Function. Since by default the batching settings were set to wait for 1000 ms [1], the user had observed a shockingly bad latency.

I propose changing the default to 100 ms as it offers reasonable buffering in high throughput cases (most publish requests take fewer than 100ms to complete) and prevent excessively high latency with default settings for these one-off cases.

[1]

maxMilliseconds: 1000,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. perf type: enhancement
Projects
None yet
Development

No branches or pull requests

4 participants