tilegroxy docs
Counters aren’t shared between instances, so a deployment of N instances lets through N times each limit, and that multiple changes whenever an autoscaler adds or removes instances. Counts are also lost on restart, which makes this unsuitable for long periods. Use redis in production.

Description

When maxsize is reached the least recently used counters are dropped, which resets the limit for whoever they belonged to. Counters are kept across a reload as long as maxsize doesn’t change.

Since the counters live inside the server process, the ratelimit status and ratelimit reset commands can’t read or reset them.

Also accepts the policies and options shared by every store.

Example

  • YAML

  • JSON

ratelimit:
  name: memory
  maxsize: 10000
  policies:
    - id: standard
      rules:
        - segment:
            - user
          limit: 50
          period: 1
{
  "ratelimit": {
    "name": "memory",
    "maxsize": 10000,
    "policies": [
      {
        "id": "standard",
        "rules": [
          {
            "segment": [
              "user"
            ],
            "limit": 50,
            "period": 1
          }
        ]
      }
    ]
  }
}

Configuration

Parameter Description Type Required Default

maxsize

Maximum number of counters to hold. Each combination of rule and segment values is one counter

uint32

No

100000