---
id: "cloudflare-rate-limiting"
type: "component"
kind: "rate-limiter"
provider: "cloudflare"
category: "edge"
docs: "https://developers.cloudflare.com/waf/rate-limiting-rules/"
url: "https://localhost:3000/catalogue/components/cloudflare-rate-limiting"
---

# Cloudflare Rate Limiting

Edge rate limiting rules on the Cloudflare network.

| | |
|---|---|
| Provider | [cloudflare](https://localhost:3000/catalogue?provider=cloudflare) |
| Kind | [Rate limiter](https://localhost:3000/catalogue/kinds/rate-limiter) |
| Category | Edge |
| Official docs | [https://developers.cloudflare.com/waf/rate-limiting-rules/](https://developers.cloudflare.com/waf/rate-limiting-rules/) |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `action` | enum | `block`, `challenge`, `log` | no | "block" | inherited |
| `algorithm` | enum | `token-bucket`, `leaky-bucket`, `sliding-window`, `fixed-window`, `adaptive` | no | "token-bucket" | **"fixed-window"** |
| `atomicOps` (advanced) | boolean | — | no | true | inherited |
| `distributed` | boolean | — | no | false | **true** |
| `failMode` | enum | `open`, `closed` | no | "open" | inherited |
| `managed` | boolean | — | no | false | **true** |
| `placement` | enum | `edge`, `gateway`, `sidecar`, `in-process` | no | "gateway" | **"edge"** |
| `scope` | enum | `global`, `user`, `ip`, `api-key`, `concurrency` | no | "user" | **"ip"** |

Bold values are the ones this component pins.

## Rules that apply · 0

No rule selects this kind or its category.

## Other products of the same kind · 6

- [Cloudflare Waiting Room](https://localhost:3000/catalogue/components/cloudflare-waiting-room.md) `cloudflare-waiting-room` — cloudflare
- [Envoy rate limit service](https://localhost:3000/catalogue/components/envoy-ratelimit.md) `envoy-ratelimit` — default
- [In-process rate limiter](https://localhost:3000/catalogue/components/in-process-limiter.md) `in-process-limiter` — default
- [NGINX limit_req](https://localhost:3000/catalogue/components/nginx-limit-req.md) `nginx-limit-req` — default
- [Generic rate limiter](https://localhost:3000/catalogue/components/rate-limiter.md) `rate-limiter` — default
- [Redis rate limiter](https://localhost:3000/catalogue/components/redis-rate-limiter.md) `redis-rate-limiter` — default

## Use it in a design

```yaml
nodes:
  - { id: "cloudflare-rate-limiting", component: "cloudflare-rate-limiting" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# Cloudflare Rate Limiting: managed at the edge, fixed counting periods keyed by IP by default, blocks when exceeded.
schemaVersion: "1"
type: "component"
id: "cloudflare-rate-limiting"
kind: "rate-limiter"
provider: "cloudflare"
docs: "https://developers.cloudflare.com/waf/rate-limiting-rules/"
defaults:
  managed: true
  algorithm: "fixed-window"
  scope: "ip"
  placement: "edge"
  distributed: true
properties:
  action:
    type: "enum"
    values: ["block", "challenge", "log"]
    default: "block"
```

Human page: https://localhost:3000/catalogue/components/cloudflare-rate-limiting
