I'm fetching data from my google cloud bucket with @google-cloud/storage
library. However I'm not able to get more than ~5 downloads/second from the bucket.
const Storage = require('@google-cloud/storage');
const storage = Storage({ keyFilename: './gcloud-api-creds.json' });
const bucket = storage.bucket('my-bucket');
Promise.all(Array.from(Array(80)).map(
(d,i) => bucket.file(`index.html`)
.download()
.then(() => console.log(`done ${i}`))
)).then(() => console.log("READY"));
Takes around ~14 seconds to complete 80 download requests. I believe I'm hitting some per user limit of storage.
Google Cloud Storage docs claims supporting ~5000 req/s by default
There is no limit to reads of an object. Buckets initially support roughly 5000 reads per second and then scale as needed. (https://cloud.google.com/storage/quotas)
How can I achieve that rate?