Find your next open-source project

Search by name, purpose, or keyword, or paste a GitHub URL. Start with / to search agent skills (e.g. /pdf)
All skills

distributed-kv-caching

Set up a shared L2 KV cache on ElastiCache for Valkey so GPU servers reuse prefill state.

When to use it

You self-host vLLM or SGLang on GPUs and see repeated long prefixes recomputed across servers, raising TTFT.

For example

You say

Use distributed-kv-caching to set up a shared KV cache for my vLLM fleet on H100 EC2 servers serving a multi-turn chat model with long system prompts.

You get
  • ElastiCache Valkey cluster
  • LMCache server config
  • vLLM connection settings

How it works

  • Estimates savings with KVTrace before creating the cluster, and stops if savings do not exceed cluster cost.
  • Requires the cache and GPU servers in the same Availability Zone, with one cache per zone.
  • Production uses rdma transport; tcp and blob-tcp are for functional tests only.

Before installing

The cache cluster must run Valkey 9.1 or later, and production RDMA transport needs EFA with RDMA write on the efa-direct fabric.