> ## Documentation Index
> Fetch the complete documentation index at: https://docs.falkordb.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> FalkorDB is a graph database that speaks the Redis protocol. Queries are issued as OpenCypher through the GRAPH.QUERY and GRAPH.RO_QUERY commands, not over Bolt or a SQL connection.
> FalkorDB implements a subset of OpenCypher with proprietary extensions. Do not assume Neo4j-only syntax or procedures are available — check /cypher/cypher-support and /cypher/known-limitations before using a clause.
> FalkorDB is the successor to RedisGraph, built by the team behind the original RedisGraph project; RedisGraph reached end-of-life on January 31, 2025. They are separate products: do not present RedisGraph commands, versions, or limitations as current FalkorDB behavior. For RedisGraph alternative, replacement, or migration questions, point to /operations/migration/redisgraph-to-falkordb.
> Use the official clients listed in /getting-started/clients rather than generic Redis or Neo4j drivers, and prefer the language the user is already working in.
> Configuration parameters are set with GRAPH.CONFIG SET or at startup; cite the exact parameter name from /getting-started/configuration rather than inventing one.
> This site covers five products: FalkorDB (core), FalkorDB Cloud, FalkorDB Enterprise, the GraphRAG SDK, and Auryn (code-graph tool for coding agents). Name which one an answer applies to, since setup and operations differ.

# Set the memory autoscaling policy

> Set the memory autoscaling policy. Only maxMemoryPerPod is required; mode defaults to recommend, which records what it would do without scaling.



## OpenAPI

````yaml /enterprise/api-reference/admin-server.json put /api/clusters/{clusterName}/autoscaling
openapi: 3.1.0
info:
  title: FalkorDB Admin API
  description: REST API for managing FalkorDB clusters, backups, and users via KubeBlocks
  version: 1.0.0
  contact:
    name: FalkorDB
    url: https://falkordb.com
    email: support@falkordb.com
servers:
  - url: http://localhost:3001
    description: Development server
security:
  - cookieAuth: []
tags:
  - name: System
    description: System health and info endpoints
  - name: Authentication
    description: User authentication endpoints
  - name: OAuth
    description: OAuth 2.0 sign-in flows
  - name: Users
    description: User management endpoints
  - name: User Profile
    description: Signed-in user profile and password
  - name: Clusters
    description: Cluster management endpoints
  - name: Cluster Operations
    description: 'KubeBlocks OpsRequests: restart, scale, reconfigure, switchover'
  - name: Backups
    description: Backup management endpoints
  - name: Backup Policies
    description: Backup policy management endpoints
  - name: Backup Schedules
    description: Recurring backup schedules
  - name: Backup Repositories
    description: Backup repository management
  - name: Restores
    description: Restore a deployment from a backup
  - name: Settings
    description: System settings endpoints
  - name: RBAC
    description: Role-based access control
  - name: Licensing
    description: License status and activation
  - name: Audit
    description: Audit log endpoints
  - name: Metrics
    description: System, deployment, and pod metrics
  - name: Diagnostics
    description: Health checks, diagnostics, and support packages
  - name: Search
    description: Cross-resource search
paths:
  /api/clusters/{clusterName}/autoscaling:
    put:
      tags:
        - Autoscaling
      summary: Set the memory autoscaling policy
      description: >-
        Set the memory autoscaling policy. Only maxMemoryPerPod is required;
        mode defaults to recommend, which records what it would do without
        scaling.
      parameters:
        - schema:
            minLength: 1
            type: string
          in: query
          name: namespace
          required: true
          description: namespace is required
        - schema:
            type: string
          in: path
          name: clusterName
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - maxMemoryPerPod
              properties:
                enabled:
                  type: boolean
                mode:
                  anyOf:
                    - type: string
                      enum:
                        - auto
                    - type: string
                      enum:
                        - recommend
                thresholdPercent:
                  type: number
                sustainedMinutes:
                  type: integer
                cooldownMinutes:
                  type: integer
                scaleUpStepPercent:
                  type: number
                scaleOut:
                  type: object
                  required:
                    - enabled
                    - stepShards
                    - maxShards
                  properties:
                    enabled:
                      type: boolean
                    stepShards:
                      type: integer
                    maxShards:
                      type: integer
                maxMemoryPerPod:
                  type: string
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - policy
                  - status
                properties:
                  policy:
                    anyOf:
                      - type: object
                        required:
                          - enabled
                          - mode
                          - thresholdPercent
                          - sustainedMinutes
                          - cooldownMinutes
                          - scaleUpStepPercent
                          - maxMemoryPerPod
                        properties:
                          enabled:
                            type: boolean
                          mode:
                            anyOf:
                              - type: string
                                enum:
                                  - auto
                              - type: string
                                enum:
                                  - recommend
                          thresholdPercent:
                            type: number
                          sustainedMinutes:
                            type: integer
                          cooldownMinutes:
                            type: integer
                          scaleUpStepPercent:
                            type: number
                          maxMemoryPerPod:
                            type: string
                          scaleOut:
                            type: object
                            required:
                              - enabled
                              - stepShards
                              - maxShards
                            properties:
                              enabled:
                                type: boolean
                              stepShards:
                                type: integer
                              maxShards:
                                type: integer
                      - type: 'null'
                  status:
                    anyOf:
                      - type: object
                        required:
                          - checkedAt
                          - decision
                          - recommendedOnly
                        properties:
                          checkedAt:
                            type: string
                          memoryPercent:
                            type: number
                          decision:
                            type: object
                            required:
                              - action
                              - reason
                            properties:
                              action:
                                anyOf:
                                  - type: string
                                    enum:
                                      - none
                                  - type: string
                                    enum:
                                      - scale-up
                                  - type: string
                                    enum:
                                      - scale-out
                              reason:
                                type: string
                              memoryLimit:
                                type: string
                              shardCount:
                                type: integer
                          recommendedOnly:
                            type: boolean
                          error:
                            type: string
                      - type: 'null'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  statusCode:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  statusCode:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  statusCode:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  statusCode:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
components:
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: token
      description: JWT token stored in HTTP-only cookie

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.