← Back to directory

Audit a Redis key list (key, TTL, size, type, element count): keys without TTL b...

https://code.halowerk.com/v1/redis-key-audit

Overview

Audit a Redis key list (key, TTL, size, type, element count): keys without TTL by prefix, big strings and collections, encoding limits, long key names, mass expiry and memory per prefix. Works on a key list you export yourself (e.g. SCAN with TTL, MEMORY USAGE, TYPE and HLEN/ZCARD/SCARD/LLEN) as JSON or CSV; nothing connects to Redis. Groups keys by prefix and by pattern (numeric, UUID and hex segments become {id}) with bytes, share, keys without TTL and average TTL.

Protocol x402 (POST)
Price $0.0030
Payment Asset USD Coin
Payment Network Base
Category uncategorized
Provider code
Source bazaar
Indexed 2026-11-20 14:09:44

Health

Status unknown
Latency (p50) —
Uptime (30d) —
Reliability Score —
Last Checked Never
Last Healthy Never
Consecutive Failures 0

x402 Payment Validation

Payment Requirements —
Asset Verified —
Facilitator —

Input Schema

{ "body": { "keys": [ { "bytes": 300, "key": "session:8f3a9c2e", "ttl": -1, "type": "string" }, { "bytes": 900000, "elements": 12000, "key": "feed:global", "ttl": -1, "type": "zset" } ] }, "bodyType": "json", "method": "POST", "type": "http" }

Output Schema

{ "example": { "limitations": [ "Analyses the key list you provide; sizes are taken as given (MEMORY USAGE samples nested values).", "Big-key thresholds are reference values and can be adjusted." ], "result": { "expiry_clusters": [], "findings": [ { "detail": { "elements": 12000, "threshold": 5000 }, "fix": "Shard the collection by a sub-key; delete it with UNLINK (Redis 4.0+) instead of DEL.", "key": "feed:global", "message": "zset with 12000 elements exceeds 5000 elements.", "rule": "big-collection", "severity": "warning", "source": "https://support.huaweicloud.com/eu/bestpractice-dcs/dcs-bp-0220411.html" }, { "detail": { "elements": 12000, "max_element_bytes": null, "type": "zset" }, "key": "feed:global", "message": "Sorted set exceeds zset-max-listpack-entries 128 or -value 64 bytes and uses the skiplist encoding.", "rule": "listpack-exceeded", "severity": "info", "source": "https://github.com/redis/redis/blob/83937c51afb53e1c69661c8e1533e0e19b896fe1/src/config.c" }, { "detail": { "keys": 1, "keys_without_ttl": 1 }, "fix": "Check whether these keys are meant to be permanent.", "message": "1 of 1 keys under \"feed\" never expire.", "prefix": "feed", "rule": "no-ttl", "severity": "info", "source": "https://redis.io/docs/latest/commands/expire/" }, { "detail": { "keys": 1, "keys_without_ttl": 1 }, "fix": "Set a TTL when writing (SET ... EX / EXPIRE).", "message": "1 of 1 keys under \"session\" never expire; the prefix suggests temporary data.", "prefix": "session", "rule": "no-ttl", "severity": "warning", "source": "https://redis.io/docs/latest/commands/expire/" } ], "largest_keys": [ { "bytes": 900000, "key": "feed:global", "ttl": -1, "type": "zset" }, { "bytes": 300, "key": "session:8f3a9c2e", "ttl": -1, "type": "string" } ], "patterns": [ { "bytes": 900000, "keys": 1, "no_ttl": 1, "pattern": "feed:global" }, { "bytes": 300, "keys": 1, "no_ttl": 1, "pattern": "session:{id}" } ], "prefixes": [ { "avg_ttl_seconds": null, "bytes": 900000, "keys": 1, "max_bytes": 900000, "no_ttl": 1, "prefix": "feed", "share": 0.9997 }, { "avg_ttl_seconds": null, "bytes": 300, "keys": 1, "max_bytes": 300, "no_ttl": 1, "prefix": "session", "share": 0.0003 } ], "summary": { "findings": 4, "keys": 2, "missing_keys_skipped": 0, "no_ttl_bytes": 900300, "no_ttl_keys": 2, "total_bytes": 900300, "types": { "string": 1, "zset": 1 }, "with_ttl_keys": 0 }, "thresholds": { "big_collection_elements": 5000, "big_string_bytes": 10240, "big_total_bytes": 52428800, "encoding": { "hash_entries": 512, "hash_value": 64, "set_intset_entries": 512, "set_listpack_entries": 128, "set_listpack_value": 64, "zset_entries": 128, "zset_value": 64 }, "expiry_cluster_min": 100, "long_key_bytes": 1024 } }, "service": "redis-key-audit", "status": "success" }, "type": "json" }