Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ci/pod/docker-compose.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ services:
- "6379:6379"
- "6380:6380"

## Valkey
# No TLS/ACL config is needed here (unlike apisix_redis) because the Valkey
# tests only cover the plaintext, non-auth path. Add a command/volumes block
# mirroring apisix_redis if TLS or ACL coverage is introduced later.
apisix_valkey:
image: valkey/valkey:8
restart: unless-stopped
ports:
- "6381:6379"

## Etcd
etcd_old:
image: bitnamilegacy/etcd:3.3.8
Expand Down
19 changes: 19 additions & 0 deletions docs/en/latest/plugins/ai-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,25 @@ Even with `cache_key.share_across_routes` enabled, the cache key identifies the

:::

## Valkey Compatibility

[Valkey](https://valkey.io/) works as a drop-in replacement for the exact (L1) cache layer. Because Valkey implements the Redis serialization protocol (RESP), no code or schema changes are required — configure the same `redis_host`, `redis_port`, `redis_password`, and other Redis attributes to point to your Valkey deployment.

The semantic (L2) layer is an exception: it requires the RediSearch module (available in [Redis Stack](https://redis.io/docs/stack/)), which Valkey does not provide. Use Valkey only when `layers` is omitted or contains only `"exact"`.

For example, to back the exact (L1) cache with a Valkey instance:

```json
{
"layers": ["exact"],
"redis_host": "valkey.example.com",
"redis_port": 6379,
"redis_password": "secret",
"redis_database": 0,
"redis_timeout": 1000
}
```

## Attributes

| Name | Type | Required | Default | Valid values | Description |
Expand Down
17 changes: 17 additions & 0 deletions docs/en/latest/plugins/ai-rate-limiting.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@ import TabItem from '@theme/TabItem';

The `ai-rate-limiting` Plugin enforces token-based rate limiting for requests sent to LLM services. It helps manage API usage by controlling the number of tokens consumed within a specified time frame, ensuring fair resource allocation and preventing excessive load on the service. It is often used with [`ai-proxy`](./ai-proxy.md) or [`ai-proxy-multi`](./ai-proxy-multi.md) Plugin.

## Valkey Compatibility

[Valkey](https://valkey.io/) is fully compatible with this Plugin. Because Valkey implements the Redis serialization protocol (RESP), you can use a Valkey instance as a drop-in replacement wherever a Redis instance is configured. No code or schema changes are required — configure the same `redis_host`, `redis_port`, `redis_password`, and other Redis attributes to point to your Valkey deployment.

For example, to point the `redis` policy at a Valkey instance:

```json
{
"policy": "redis",
"redis_host": "valkey.example.com",
"redis_port": 6379,
"redis_password": "secret",
"redis_database": 0,
"redis_timeout": 1000
}
```

## Attributes

| Name | Type | Required | Default | Valid values | Description |
Expand Down
17 changes: 17 additions & 0 deletions docs/en/latest/plugins/graphql-limit-count.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ You may see the following rate limiting headers in the response:
- `X-RateLimit-Remaining`: the remaining quota
- `X-RateLimit-Reset`: number of seconds left for the counter to reset

## Valkey Compatibility

[Valkey](https://valkey.io/) is fully compatible with this Plugin. Because Valkey implements the Redis serialization protocol (RESP), you can use a Valkey instance as a drop-in replacement wherever a Redis instance is configured. No code or schema changes are required — configure the same `redis_host`, `redis_port`, `redis_password`, and other Redis attributes to point to your Valkey deployment.

For example, to point the `redis` policy at a Valkey instance:

```json
{
"policy": "redis",
"redis_host": "valkey.example.com",
"redis_port": 6379,
"redis_password": "secret",
"redis_database": 0,
"redis_timeout": 1000
}
```

## Attributes

This Plugin shares the same schema as the [limit-count](./limit-count.md) Plugin. Refer to that page for the full attribute reference. Key attributes are listed below.
Expand Down
17 changes: 17 additions & 0 deletions docs/en/latest/plugins/limit-conn.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ import TabItem from '@theme/TabItem';

The `limit-conn` Plugin limits the rate of requests by the number of concurrent connections. Requests exceeding the threshold will be delayed or rejected based on the configuration, ensuring controlled resource usage and preventing overload.

## Valkey Compatibility

[Valkey](https://valkey.io/) is fully compatible with this Plugin. Because Valkey implements the Redis serialization protocol (RESP), you can use a Valkey instance as a drop-in replacement wherever a Redis instance is configured. No code or schema changes are required — configure the same `redis_host`, `redis_port`, `redis_password`, and other Redis attributes to point to your Valkey deployment.

For example, to point the `redis` policy at a Valkey instance:

```json
{
"policy": "redis",
"redis_host": "valkey.example.com",
"redis_port": 6379,
"redis_password": "secret",
"redis_database": 0,
"redis_timeout": 1000
}
```

## Attributes

| Name | Type | Required | Default | Valid values | Description |
Expand Down
17 changes: 17 additions & 0 deletions docs/en/latest/plugins/limit-count.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ You may see the following rate limiting headers in the response:
* `X-RateLimit-Remaining`: the remaining quota
* `X-RateLimit-Reset`: number of seconds left for the counter to reset

## Valkey Compatibility

[Valkey](https://valkey.io/) is fully compatible with this Plugin. Because Valkey implements the Redis serialization protocol (RESP), you can use a Valkey instance as a drop-in replacement wherever a Redis instance is configured. No code or schema changes are required — configure the same `redis_host`, `redis_port`, `redis_password`, and other Redis attributes to point to your Valkey deployment.

For example, to point the `redis` policy at a Valkey instance:

```json
{
"policy": "redis",
"redis_host": "valkey.example.com",
"redis_port": 6379,
"redis_password": "secret",
"redis_database": 0,
"redis_timeout": 1000
}
```

## Attributes

| Name | Type | Required | Default | Valid values | Description |
Expand Down
17 changes: 17 additions & 0 deletions docs/en/latest/plugins/limit-req.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ The `limit-req` Plugin supports two modes of rate limiting:
* **Local rate limiting**: Limits are enforced independently on each gateway instance. Each instance maintains its own counters, so the effective limit is roughly (limit × number of instances) when traffic is spread across instances. This is the default when no `policy` is set or when `policy` is `local`.
* **Redis-based rate limiting**: Limits are shared across all gateway instances through Redis. All instances share the same quota, so the configured limit applies to all gateway instances.

## Valkey Compatibility

[Valkey](https://valkey.io/) is fully compatible with this Plugin. Because Valkey implements the Redis serialization protocol (RESP), you can use a Valkey instance as a drop-in replacement wherever a Redis instance is configured. No code or schema changes are required — configure the same `redis_host`, `redis_port`, `redis_password`, and other Redis attributes to point to your Valkey deployment.

For example, to point the `redis` policy at a Valkey instance:

```json
{
"policy": "redis",
"redis_host": "valkey.example.com",
"redis_port": 6379,
"redis_password": "secret",
"redis_database": 0,
"redis_timeout": 1000
}
```

## Attributes

| Name | Type | Required | Default | Valid values | Description |
Expand Down
21 changes: 21 additions & 0 deletions docs/en/latest/plugins/openid-connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ import TabItem from '@theme/TabItem';

The `openid-connect` Plugin supports the integration with [OpenID Connect (OIDC)](https://openid.net/connect/) identity providers, such as Keycloak, Auth0, Microsoft Entra ID, Google, Okta, and more. It allows APISIX to authenticate clients and obtain their information from the identity provider before allowing or denying their access to upstream protected resources.

## Valkey Compatibility

[Valkey](https://valkey.io/) is fully compatible with this Plugin's Redis session storage. Because Valkey implements the Redis serialization protocol (RESP), you can use a Valkey instance as a drop-in replacement wherever a Redis instance is configured. No code or schema changes are required — when `session.storage` is `redis`, point `session.redis.host`, `session.redis.port`, `session.redis.password`, and the other `session.redis.*` attributes at your Valkey deployment.

For example, to store sessions in a Valkey instance:

```json
{
"session": {
"secret": "your-session-secret-min-16-chars",
"storage": "redis",
"redis": {
"host": "valkey.example.com",
"port": 6379,
"password": "secret",
"database": 0
}
}
}
```

## Attributes

| Name | Type | Required | Default | Valid values | Description |
Expand Down
2 changes: 1 addition & 1 deletion t/lib/test_redis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ local _M = {}

-- 6479 is the sentinel master used by the redis-sentinel policies; leftover
-- counters there survive CI re-runs if it is not flushed
local DEFAULT_PORTS = {6379, 6479, 5000, 5001, 5002, 5003, 5004, 5005, 5006}
local DEFAULT_PORTS = {6379, 6381, 6479, 5000, 5001, 5002, 5003, 5004, 5005, 5006}
local DEFAULT_HOST = "127.0.0.1"

local function log_warn(...)
Expand Down
Loading
Loading