Repository navigation
Description
Title: Redis proxy custom_commands not allowed inside transactions
Description:
I have configured envoy to be a redis proxy in front of AWS Memory DB (valkey engine 7.3). i have added json.set to my custom commands list. When i execute json.set it is treated as a simple command. when i attempt to execute two json.set operations inside a transaction i get the error ...pipeline caused error: 'JSON.SET' command is not supported within transaction
according to the comment in the code here all 'simple' commands should be able to execute in a transaction and all 'custom commands' are supposed to be treated as 'simple' commands.
it appears that the command check here is missing a check to see if the command is in the custom commands list
Repro steps:
requires docker runtime
run-envoy.sh
#!/bin/bash
docker run --rm -it \
-p 9901:9901 -p 6380:6380 \
-v $(pwd):/app \
envoyproxy/envoy:debug-dev \
envoy -c /app/envoy.yaml -l debug
% redis-cli -h localhost -p 6380
localhost:6380> multi
OK
localhost:6380(TX)> json.set somekey $ value
(error) 'json.set' command is not supported within transaction
localhost:6380(TX)> exit
%Admin and Stats Output:
% curl localhost:9901/clusters
deny::observability_name::deny
deny::default_priority::max_connections::1024
deny::default_priority::max_pending_requests::1024
deny::default_priority::max_requests::1024
deny::default_priority::max_retries::3
deny::high_priority::max_connections::1024
deny::high_priority::max_pending_requests::1024
deny::high_priority::max_requests::1024
deny::high_priority::max_retries::3
deny::added_via_api::false
Config:
minimal envoy.yaml for demonstrating issue
node:
id: memorydb-gw-1
cluster: memorydb-gw
static_resources:
listeners:
- name: redis_listener
address:
socket_address:
address: 0.0.0.0
port_value: 6380 # Port Envoy will listen on for Redis/Valkey clients
filter_chains:
- filters:
- name: envoy.filters.network.redis_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy
stat_prefix: derp
settings:
op_timeout: 5s
prefix_routes:
catch_all_route:
cluster: deny # commands allowed to pass envoy will return a no upstream host error(normal)
custom_commands:
- json.set # my custom command that should be treated as a 'simple command'
clusters:
- name: deny
connect_timeout: 1s
type: STATIC
load_assignment:
cluster_name: deny
endpoints: []
admin:
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }Logs:
test.log
Call Stack:
N/A - not crashing
Activity
wbpcode commentedon Nov 19, 2025
@mattklein123 Hello, Matt, is there any suggestion to this problem?
agnewp commentedon Nov 19, 2025
sooooo the creator of envoy and CTO of Bitdrift is the ONLY person who could address this issue? he sounds a little busy... its me or nobody i suppose. time to dust off the c++ skillz.
nbaws commentedon Nov 20, 2025
@VivekSubr added the custom commands feature - are you able to determine suitability for this in the transaction processing code path? It looks reasonable to me but I'm not a redis expert :)
redis_proxy: allow custom commands within transactions (#45958)