MongoDB

Table of requirements and performance

Connector type Minimum requirements Required fields Performance

MongoDB

Driver version: 7

Check MongoDB official documentation.

Example with AWS instance:

  • Type: t2.medium

  • OS: Amazon Linux 2 CentOS RHEL (Fedora)

  • Memory: 1 GiB

  • CPU: 2 vCPU

  • Storage: 50 GiB

  • Connection string: mongo.uri: <value>

    • Example:

mongo.uri: mongodb://root:password@172.18.0.2:27017
  • JMeter: Thread 500, Loop 100

  • Memory: 200 MB

  • Samples: 50000

  • Average latency (ms): 932.13

  • Throughput/second 495.11

Operations

Create

{
   "operation": "INSERT",
   "collectionName": "myCollection",
   "databaseName": "myDatabase",
   "values": {
       "name": "$body.name",
       "country": "$body.country",
       "zip": "$headerParam.zip",
       "age": $body.age
   }
}

Read

{
   "operation": "findOneByQuery",
   "collectionName": "myCollection",
   "databaseName": "myDatabase",
   "values": {
       "$body.key": "$body.value"
   }
}
{
   "operation": "findAll",
   "collectionName": "myCollection",
   "databaseName": "myDatabase"
}

Delete

{
   "operation": "REMOVE",
   "databaseName": "connector-test",
   "collectionName": "connector",
   "values": {
       "$body.key": "$body.value"
   }

Update

{
   "operation": "UPDATE",
   "collectionName": "connector",
   "databaseName": "connector-test",
   "values": {
       "$set": {
           "$body.field": "$body.value"
       }
   },
   "headers": [
       {
           "filter": "{\"$queryParam.param\": \"$queryParam.value\"}"
       }
   ]
}

Example

See in the gif below an example of instruction for the MongoDB connector with the operation create (insert):

instruction mongodb
Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]