Skip to content

Limits and Metrics

The demo exposes its live configuration at:

https://mrhisearch.com/api/demo/limits

Use that endpoint if you need the current deployed values at runtime.

These are the defaults in this repo right now.

SettingDefaultMeaning
maxVectors10000Max vectors per token
maxDimensions1024Max vector length
maxAddBatch512Max vectors per add-many
maxIdBatch1000Max ids per batch read/delete
maxQueryBatch50Max queries per search-many
SettingDefaultMeaning
maxMetadataBytes8192Max metadata size per vector
maxFilterBytes8192Max filter object size
maxRequestBodyBytes10485760Max request body size
SettingDefaultMeaning
tokenIssuePerIp.limit24Tokens per IP per hour
requestsPerIp.limit180General requests per IP per minute
searchesPerIp.limit60Search requests per IP per minute
mutationsPerIp.limit60Mutation requests per IP per minute

The corresponding windows are:

  • tokenIssuePerIp.windowMs = 3600000
  • requestsPerIp.windowMs = 60000
  • searchesPerIp.windowMs = 60000
  • mutationsPerIp.windowMs = 60000
SettingDefaultMeaning
ttlMs21600000Session lifetime after inactivity
sweepCron* * * * *Expired session cleanup schedule
metriccosineDefault similarity metric
vectorTypefloat32Stored vector type
  • One token owns one temporary session
  • The first successful add initializes the session’s dimensions and metric
  • Later adds and searches must match the same dimensions
  • clear removes vectors but keeps the session configuration
  • index/reset removes the whole index so the token can switch dimensions or metric
  • When the session expires, the token and its index are deleted

Every response includes:

MetricMeaning
requestLatencyMsTotal request time

Some routes also include operation-specific fields:

MetricMeaning
tokenIssueMsToken creation time
dbOpenMsTime to open the index
statsReadMsTime to read MRHI stats
hasMsTime to test one id
getMsTime to read one vector
getManyMsTime to read multiple vectors
getMetadataMsTime to read metadata
setMetadataMsTime to write metadata
deleteMetadataMsTime to remove metadata
capacityCheckMsTime spent checking vector cap
addMsTime to add one vector
addManyMsTime to add a batch
searchMsTime for one vector search
searchManyMsTime for batched vector search
resetMsTime to reset the index
deleteMsTime to delete one vector
deleteManyMsTime to delete many vectors
clearMsTime to clear the index
resultCountNumber of hits returned
queryCountNumber of query vectors submitted

Not every endpoint returns every metric. See Endpoints for the exact per-route mapping.

{
"success": true,
"limits": {
"vectors": {
"maxVectors": 10000,
"maxDimensions": 1024,
"maxAddBatch": 512,
"maxIdBatch": 1000,
"maxQueryBatch": 50
},
"payloads": {
"maxMetadataBytes": 8192,
"maxFilterBytes": 8192,
"maxRequestBodyBytes": 10485760
},
"rateLimits": {
"tokenIssuePerIp": { "limit": 24, "windowMs": 3600000 },
"requestsPerIp": { "limit": 180, "windowMs": 60000 },
"searchesPerIp": { "limit": 60, "windowMs": 60000 },
"mutationsPerIp": { "limit": 60, "windowMs": 60000 }
},
"session": {
"ttlMs": 21600000,
"sweepCron": "* * * * *"
},
"defaults": {
"metric": "cosine",
"vectorType": "float32"
}
}
}