Limits and Metrics
The demo exposes its live configuration at:
https://mrhisearch.com/api/demo/limitsUse that endpoint if you need the current deployed values at runtime.
Current defaults
Section titled “Current defaults”These are the defaults in this repo right now.
Vector limits
Section titled “Vector limits”| Setting | Default | Meaning |
|---|---|---|
maxVectors | 10000 | Max vectors per token |
maxDimensions | 1024 | Max vector length |
maxAddBatch | 512 | Max vectors per add-many |
maxIdBatch | 1000 | Max ids per batch read/delete |
maxQueryBatch | 50 | Max queries per search-many |
Payload limits
Section titled “Payload limits”| Setting | Default | Meaning |
|---|---|---|
maxMetadataBytes | 8192 | Max metadata size per vector |
maxFilterBytes | 8192 | Max filter object size |
maxRequestBodyBytes | 10485760 | Max request body size |
Rate limits
Section titled “Rate limits”| Setting | Default | Meaning |
|---|---|---|
tokenIssuePerIp.limit | 24 | Tokens per IP per hour |
requestsPerIp.limit | 180 | General requests per IP per minute |
searchesPerIp.limit | 60 | Search requests per IP per minute |
mutationsPerIp.limit | 60 | Mutation requests per IP per minute |
The corresponding windows are:
tokenIssuePerIp.windowMs = 3600000requestsPerIp.windowMs = 60000searchesPerIp.windowMs = 60000mutationsPerIp.windowMs = 60000
Session defaults
Section titled “Session defaults”| Setting | Default | Meaning |
|---|---|---|
ttlMs | 21600000 | Session lifetime after inactivity |
sweepCron | * * * * * | Expired session cleanup schedule |
metric | cosine | Default similarity metric |
vectorType | float32 | Stored vector type |
Session behavior
Section titled “Session behavior”- 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
clearremoves vectors but keeps the session configurationindex/resetremoves the whole index so the token can switch dimensions or metric- When the session expires, the token and its index are deleted
Metrics
Section titled “Metrics”Every response includes:
| Metric | Meaning |
|---|---|
requestLatencyMs | Total request time |
Some routes also include operation-specific fields:
| Metric | Meaning |
|---|---|
tokenIssueMs | Token creation time |
dbOpenMs | Time to open the index |
statsReadMs | Time to read MRHI stats |
hasMs | Time to test one id |
getMs | Time to read one vector |
getManyMs | Time to read multiple vectors |
getMetadataMs | Time to read metadata |
setMetadataMs | Time to write metadata |
deleteMetadataMs | Time to remove metadata |
capacityCheckMs | Time spent checking vector cap |
addMs | Time to add one vector |
addManyMs | Time to add a batch |
searchMs | Time for one vector search |
searchManyMs | Time for batched vector search |
resetMs | Time to reset the index |
deleteMs | Time to delete one vector |
deleteManyMs | Time to delete many vectors |
clearMs | Time to clear the index |
resultCount | Number of hits returned |
queryCount | Number of query vectors submitted |
Not every endpoint returns every metric. See Endpoints for the exact per-route mapping.
Example limits response
Section titled “Example limits response”{ "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" } }}