Difference between throughput and total amount of data - throughput

I believe this is NOT a throughput vs bandwith question.
I am reading docs for an API and it says the following:
Each shard has 2MB throughput, and returns up to 10MB of data
Does this mean my api call will take 5 seconds if it needs to collect 10MB of data? How does the api call return a max of 10MB of data when the throughput is 2MB?

Related

mongodb max number of parallel find() requests from single instance

What is the maximum theoretical number of parallel requests that we can squize from single mongodb instance before deciding to shard?
Considering the database and indexes fit in memory and all requests are find() queries fetching single document based on indexed field. The hosting OS is Ubuntu , the data partition is SSD. ulimits are set to max.
In my laptop with simple test on single instance I reach near 40k/sec , after that the avg execution times start to increase significantly, but wondering what can be the upper theoretical limit?
It depends. If your active dataset can fit in the memory - if most of the requests don't need to perform any disk I/O - then you can achieve 24k+ requests pretty easily. If not on a (bigger) single machine, then at least use a replica set cluster with multiple secondaries.
If an active dataset is much larger than the available RAM then you have the same problem as with any other database. The advantage of MongoDB's new engine WiredTiger (since v3.0) is a transparent compression - it can reduce the amount of data and I/O and thus improve performance - even despite the fact that compression adds CPU load.
For more performance it really helps:
if the most accessed documents are small so it takes less time to
load them, transfer them, and less time to deserialize in your app List item
If you use projections in find(), for the same reasons
if you use bulk operations to reduce networking I/O and context switches
Even MongoDB itself has an option to limit the maximum number of incoming connections. It defaults to 64k.
for more information you can refer link

Firebase Storage ~ max write rate per document?

For firestore I find under the 'soft limits' section in the docs following info
Maximum sustained write rate to a document - 1 per second
Sustaining a write rate above once per second increases latency and causes contention errors. This is not a hard limit, and you can surpass the limit in short bursts.
I have a rather big file (~800KB) in firestore at the moment which I'm quite frequently writing what gives me a warning (not as often as one time per second, but I think that might be due to the size...) and I'm wondering if it was better to switch to storage. I can't find any infos for storage though. Is it more 'robust' and no such restrictions to care about?

Postgres Logical Replication - Limiting Bandwidth Per Publisher/Subscriber

I have one publisher with around 50 subscribers. Not so often (few times a month) a binary file of size 30MB is written to the database. At this point all subscriber are getting this file and I have network bandwidth issues.
Is it possible to limit (in Postgres or OS) the bandwidth used by the logical replication per publisher/subscribers?
Is it possible to limit the bandwidth used during first sync?
At the PostgreSQL level I can suggest trying to reduce max_wal_senders parameter at the sending server (it is 10 by default)
Depending on the latency you can accept, you can limit the number of concurrent sending processes up to 1 process at a time

Bulk insert (of 1000 documents) to mongodb server is 1 IOPS in GCP, or it's 1000 iops?

I read GCP docs about performance, and I read about mongo bulk operations, and I'm wondering if bulk operation count as 1 operation (so I can do 30 like that per second per GB for example) or it's equal to the number of operations in the bulk.
thank you!
MongoDB bulk operations reduce network and processing overhead but have little effect on disk IOPS.
Disk IOPS are always proportional to the number of documents inserted/updated/deleted, also in bulk mode.
But it's not 1-to-1; in addition to # of documents, disk IOPS are dependent on the indices, journal, checkpoints, shards and cache size.
A very rough estimate would be (2 + #_of_indexes) * #_of_documents_updated / seconds.
Source: Sizing MongoDB Clusters

Google Firestore Scalability Limit

As per the Google Firebase documentation, Firestore will support upto 1,000,000 simultaneous connections and 10,000 writes per second per database. We have ran a scalalbility test to check the Firestore is viable for our solution and encountering the errors like "Connect to firebase.googleapis.com:443:Connection timed out" during write operations for 40K samples, "firestore.googleapis.com:443:failed to respond" during GET operations while the 40K samples writing. Would like to understand the Firestore limits and its scalalbility
Running JMeter script to write data to Firebase (Firestore Blaze Plan purchased for testing) on multiple VMs and PCs which are connected to wired network to check the scalalbility. The JMeter script write data to Firebase using REST API PATCH and each script on PC/VM writes 5K data in a period 5 minutes. There are total of 8 PC/VM which writes 40K data to Firebase. During this we also GET 500 records in 5 minutes 2 times a day. During this test we are htting the Firebase failures
The errors are "Connect to firebase.googleapis.com:443:Connection timed out" during write operations for 40K samples, "firestore.googleapis.com:443:failed to respond" and Connection reset.
Are you considering the other limits for your specific operations?
According to https://firebase.google.com/docs/firestore/quotas
For example, for the write operation:
Maximum writes per second per database = 10,000 (up to 10 MiB per second)
Maximum write rate to a document= 1 per second
Maximum write rate to a collection in which documents contain sequential values in an indexed field = 500 per second
Maximum number of writes that can be passed to a Commit operation or performed in a transaction = 500
During GET operations you have the limits: Maximum number of exists(), get(), and getAfter() calls per request:
10 for single-document requests and query requests.
20 for multi-document reads, transactions, and batched writes. The previous limit of 10 also applies to each operation.
For example, imagine you create a batched write request with 3 write operations and that your security rules use 2 document access calls to validate each write. In this case, each write uses 2 of its 10 access calls and the batched write request uses 6 of its 20 access calls.
Exceeding either limit results in a permission denied error.
Some document access calls may be cached, and cached calls do not count towards the limits.
I think that some parameter could be causing the abortion of these connections.