Skip to content

Conversation

rishi-jat
Copy link

Summary

  • Add Valkey backend support as Redis-compatible alternative
  • Implement RDMA configuration for future high-performance scenarios
  • Add comprehensive test suite for Valkey functionality
  • Update documentation with Valkey configuration options
  • Provide example implementation and usage guide
  • Maintain full backward compatibility with existing Redis backend

Fixes #134

- Add Valkey backend support as Redis-compatible alternative
- Implement RDMA configuration for future high-performance scenarios
- Add comprehensive test suite for Valkey functionality
- Update documentation with Valkey configuration options
- Provide example implementation and usage guide
- Maintain full backward compatibility with existing Redis backend

Fixes llm-d#134
@rishi-jat rishi-jat requested a review from vMaroon as a code owner October 4, 2025 14:16
@Copilot Copilot AI review requested due to automatic review settings October 4, 2025 14:16
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Valkey backend support as a Redis-compatible alternative for KV-cache indexing, including RDMA configuration for high-performance scenarios. The implementation maintains full backward compatibility with the existing Redis backend while providing enhanced performance options.

  • Add Valkey backend with RDMA support configuration
  • Implement comprehensive test suite for Valkey functionality
  • Provide example implementation and configuration documentation

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pkg/kvcache/kvblock/valkey_test.go Comprehensive test suite for Valkey backend functionality
pkg/kvcache/kvblock/redis.go Extended Redis implementation to support Valkey backend with RDMA
pkg/kvcache/kvblock/index.go Added Valkey configuration support to index factory
examples/valkey_example/main.go Complete example demonstrating Valkey usage
examples/valkey_example/README.md Documentation for Valkey example usage
examples/valkey_configuration.md Configuration guide for Valkey backend
docs/configuration.md Updated configuration documentation with Valkey options
docs/architecture.md Added Valkey backend description to architecture
README.md Updated main README with Valkey example reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

shouldSucceed: true,
},
{
name: "valkey with RDMA enabled",
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after comma should be removed.

Suggested change
name: "valkey with RDMA enabled",
name: "valkey with RDMA enabled",

Copilot uses AI. Check for mistakes.

name: "valkeys:// SSL URL scheme",
config: &RedisIndexConfig{
Address: "valkeys://" + server.Addr(),
BackendType: "valkey",
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after comma should be removed.

Suggested change
BackendType: "valkey",
BackendType: "valkey",

Copilot uses AI. Check for mistakes.

expectError: false,
},
{
name: "valkey:// scheme",
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after comma should be removed.

Suggested change
name: "valkey:// scheme",
name: "valkey:// scheme",

Copilot uses AI. Check for mistakes.

// DefaultValkeyIndexConfig returns a default configuration for Valkey.
func DefaultValkeyIndexConfig() *RedisIndexConfig {
return &RedisIndexConfig{
Address: "valkey://127.0.0.1:6379",
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after comma should be removed.

Suggested change
Address: "valkey://127.0.0.1:6379",
Address: "valkey://127.0.0.1:6379",

Copilot uses AI. Check for mistakes.

// Convert valkey:// to redis:// for protocol compatibility
config.Address = strings.Replace(config.Address, "valkey://", "redis://", 1)
} else if strings.HasPrefix(config.Address, "valkeys://") {
// Convert valkeys:// to rediss:// for SSL protocol compatibility
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after compatibility should be removed.

Suggested change
// Convert valkeys:// to rediss:// for SSL protocol compatibility
// Convert valkeys:// to rediss:// for SSL protocol compatibility

Copilot uses AI. Check for mistakes.


const (
envValkeyAddr = "VALKEY_ADDR"
envValkeyEnableRDMA = "VALKEY_ENABLE_RDMA"
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after string should be removed.

Suggested change
envValkeyEnableRDMA = "VALKEY_ENABLE_RDMA"
envValkeyEnableRDMA = "VALKEY_ENABLE_RDMA"

Copilot uses AI. Check for mistakes.

// Test prompts to demonstrate caching behavior
prompts := []string{
"Hello, how are you today?",
"What is the weather like?",
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after comma should be removed.

Suggested change
"What is the weather like?",
"What is the weather like?",

Copilot uses AI. Check for mistakes.

"kvBlockIndexConfig": {
"valkeyConfig": {
"address": "valkey://valkey-server:6379",
"backendType": "valkey",
Copy link
Preview

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after comma should be removed.

Suggested change
"backendType": "valkey",
"backendType": "valkey",

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Valkey and RDMA support
1 participant