Home > Software engineering >  What is the precise definition of a "read" in MongoDB?
What is the precise definition of a "read" in MongoDB?

Time:01-02

In the docs it says "$0.10/million reads".

I have a collection with a 1 million documents. I was testing some intensive queries just for one day by myself and my account accumulated a charge of $26.

Not sure how I got there.

So I need to know the precise definition of a "read". Is it each time a document is accessed from disk?

CodePudding user response:

At the time of writing https://www.mongodb.com/pricing reads:

Item Description Pricing
Read Processing Unit (RPU) Number of read operations* to the database
* Sum of documents read divided by 4KB and index bytes read divided by 256 bytes
$0.10 / million for the first 50 million per day*

If I get it, 1 read is fetching up to 4Kb of a document or up to 256b of index, e.g. querying whole million of documents in the first stage of an aggregation pipeline costs $0.1 if your documents are about 4Kb each.

I would strongly advise to talk to Atlas support tho. Don't rely on my understanding of what's written there.

  • Related