# Warmup

## Preload all tenant configurations

> Sequentially loads configuration for all tenants to populate caches and avoid cold-start delays.\
> \
> \## Purpose\
> \- \*\*Reduce First-Request Latency\*\*: Pre-populates caches before real traffic arrives\
> \- \*\*Prevent Request Pile-Up\*\*: Avoids concurrent configuration loads during app startup\
> \- \*\*Improve User Experience\*\*: Ensures fast response times from the first request\
> \
> \## Behavior\
> \- Acquires an exclusive lock to prevent concurrent warmup operations\
> \- Returns HTTP 425 (Too Early) if another warmup is already in progress\
> \- Processes each tenant sequentially (not in parallel)\
> \- Continues warmup even if individual tenants fail (logs errors)\
> \- Respects cancellation tokens for graceful shutdown\
> \
> \## Typical Usage\
> Should be called by:\
> \- Azure App Service warmup triggers\
> \- Kubernetes readiness probes\
> \- Deployment scripts\
> \- Health check systems\
> \
> \## Performance Considerations\
> \- Duration depends on number of tenants\
> \- May take several seconds to minutes for large deployments\
> \- Does not block other API requests

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Warmup"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"paths":{"/api/warmup":{"get":{"tags":["Warmup"],"summary":"Preload all tenant configurations","description":"Sequentially loads configuration for all tenants to populate caches and avoid cold-start delays.\n\n## Purpose\n- **Reduce First-Request Latency**: Pre-populates caches before real traffic arrives\n- **Prevent Request Pile-Up**: Avoids concurrent configuration loads during app startup\n- **Improve User Experience**: Ensures fast response times from the first request\n\n## Behavior\n- Acquires an exclusive lock to prevent concurrent warmup operations\n- Returns HTTP 425 (Too Early) if another warmup is already in progress\n- Processes each tenant sequentially (not in parallel)\n- Continues warmup even if individual tenants fail (logs errors)\n- Respects cancellation tokens for graceful shutdown\n\n## Typical Usage\nShould be called by:\n- Azure App Service warmup triggers\n- Kubernetes readiness probes\n- Deployment scripts\n- Health check systems\n\n## Performance Considerations\n- Duration depends on number of tenants\n- May take several seconds to minutes for large deployments\n- Does not block other API requests","responses":{"200":{"description":"Warmup completed successfully."},"425":{"description":"Another warmup operation is already in progress.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Unexpected server error."}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thewalletcrew.io/api-reference/internal/warmup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
