{
  "schema_version": 2,
  "id": "develop/ai/featureform/register-providers/redis",
  "title": "Register Redis providers",
  "url": "https://redis.io/docs/latest/develop/ai/featureform/register-providers/redis/",
  "summary": "Register standalone Redis and Redis Cluster online-store providers with Redis Feature Form.",
  "tags": [],
  "last_updated": "2026-08-25T13:17:04-07:00",
  "page_type": "content",
  "content_hash": "f8cc110115906afb6eb674baee876daf75e6d9a11c45fc4bea4b08e33bc6a379",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Register a Redis provider when feature views need an `online-store` for materialization and inference-time reads. A Redis provider doesn't supply offline storage or compute."
    },
    {
      "id": "choose-a-redis-provider-type",
      "title": "Choose a Redis provider type",
      "role": "content",
      "text": "Choose the type that matches the topology of the Redis deployment:\n\n| Provider type | Use it for | Connection configuration | Database |\n| --- | --- | --- | --- |\n| `redis` | A single endpoint that doesn't use Redis Cluster topology discovery | Host and port | Database 0 by default; Python supports databases 0 through 15 |\n| `redis-cluster` | An open source Redis Cluster topology | One or more startup endpoints in `host:port` format | Database 0 |\n\nThe `redis-cluster` provider discovers the cluster topology from its startup endpoints. It doesn't mean every Redis service or deployment with multiple nodes uses the Redis Cluster protocol. Confirm the connection mode and endpoint format for your deployment before choosing the provider type."
    },
    {
      "id": "before-you-begin",
      "title": "Before you begin",
      "role": "content",
      "text": "Make sure you have:\n\n- A Feature Form [workspace](https://redis.io/docs/latest/develop/ai/featureform/manage-workspace).\n- Network access to Redis from the Feature Form server and any compute runtime that materializes feature views.\n- A Redis host and port, or at least one Redis Cluster startup endpoint.\n- A registered [secret provider](https://redis.io/docs/latest/develop/ai/featureform/register-providers#configure-secret-providers) for the Redis password, if authentication is enabled.\n- Certificate material available to each runtime that needs it, if Redis requires TLS or mutual TLS (mTLS).\n\nThe Python examples use this workspace-scoped provider client:\n\n[code example]"
    },
    {
      "id": "choose-authentication",
      "title": "Choose authentication",
      "role": "content",
      "text": "Redis authentication configuration is the same for both provider types:\n\n| Redis authentication | Configuration |\n| --- | --- |\n| No authentication | Omit `username` and `password_secret` |\n| Password only | Set `password_secret` and omit `username` |\n| Access control list (ACL) | Set both `username` and `password_secret` |\n\nFeature Form rejects a username without a password secret. Use a secret reference such as `env:REDIS_PASSWORD`; don't put a password value in the provider definition. An environment reference resolves in the Feature Form server environment, not in the shell where you run the CLI."
    },
    {
      "id": "register-standalone-redis",
      "title": "Register standalone Redis",
      "role": "content",
      "text": "This example uses Redis ACL authentication:\n\n**Python:**\n\n[code example]\n\n**ff CLI:**\n\n[code example]\n\n\n\nOmit the username and password fields for a deployment without authentication. For password-only authentication, omit only the username.\n\nStandalone Redis uses database 0 by default. The Python client also supports databases 0 through 15 by setting `database` in `RedisConfig`. The CLI doesn't currently expose a database option, so CLI registration uses database 0."
    },
    {
      "id": "register-redis-cluster",
      "title": "Register Redis Cluster",
      "role": "content",
      "text": "Supply one or more startup endpoints. They aren't required to list every node because the provider discovers the cluster topology.\n\n**Python:**\n\n[code example]\n\n**ff CLI:**\n\n[code example]\n\n\n\nWith the CLI, pass all startup endpoints as one comma-delimited `--redis-cluster-startup-endpoints` value. Don't repeat the flag. Redis Cluster uses database 0."
    },
    {
      "id": "configure-tls",
      "title": "Configure TLS",
      "role": "configuration",
      "text": "Set a TLS mode when the Redis deployment requires an encrypted connection:\n\n| Mode | Behavior | Required certificate configuration |\n| --- | --- | --- |\n| `disabled` | Plaintext connection | None |\n| `enabled` | TLS using the runtime's trust store and normal hostname verification | None; `insecure_skip_verify` is available only with this mode for development or testing |\n| `verify-ca` | TLS with a supplied CA certificate; verifies the certificate chain but not the hostname | CA certificate path or secret |\n| `verify-full` | TLS with a supplied CA certificate; verifies the certificate chain and hostname | CA certificate path or secret |\n| `mtls` | Full server verification plus a client certificate and key | CA certificate, client certificate, and client key, each as a path or secret |\n\nTLS 1.2 is the default minimum. Set the minimum version to `1.2` or `1.3` when you need to make it explicit. For `verify-full` and `mtls`, set `server_name` when the name used for certificate verification differs from the connection host.\n\nThis mTLS example uses file paths so the same configuration can be used by Feature Form and a Spark materialization runtime:\n\n**Python:**\n\n[code example]\n\n**ff CLI:**\n\n[code example]\n\n\n\nCertificate paths are resolved by the Feature Form server, not by the machine where you run the CLI. If Spark materializes the feature view, mount the same paths in the Spark runtime. Direct Feature Form connections can instead use the certificate secret fields, but Spark materialization doesn't project secret-backed Redis TLS certificates; use runtime-visible file paths for that workflow."
    },
    {
      "id": "use-redis-with-databricks",
      "title": "Use Redis with Databricks",
      "role": "content",
      "text": "The Feature Form server and Databricks compute must both be able to reach the Redis endpoint.\n\nFor both `job_cluster` and `existing_cluster` Spark materialization, configure `password_secret` as a Databricks secret reference. With `job_cluster`, Feature Form adds the reference to the job environment so Databricks can resolve it. With `existing_cluster`, the cluster resolves the scope and key directly. An environment, Kubernetes, Vault, or AWS secret reference can't be projected to either Databricks compute target. First register the Databricks secret provider, then use this reference format:\n\n[code example]\n\nSee [Connect Databricks compute to Redis](https://redis.io/docs/latest/develop/ai/featureform/register-providers/databricks#connect-databricks-compute-to-redis) for equivalent Python and CLI examples and the Databricks secret bootstrap requirements.\n\nRedis TLS certificate paths must also be mounted at the configured locations in the Databricks runtime. Secret-backed Redis TLS certificate fields aren't projected to Spark."
    },
    {
      "id": "configuration-reference",
      "title": "Configuration reference",
      "role": "configuration",
      "text": ""
    },
    {
      "id": "standalone-redis",
      "title": "Standalone Redis",
      "role": "content",
      "text": "| Python field | CLI flag | Requirement or default |\n| --- | --- | --- |\n| `RedisConfig.host` | `--redis-host` | Required hostname or IP address |\n| `RedisConfig.port` | `--redis-port` | Defaults to `6379` |\n| `RedisConfig.database` | Not available | Defaults to `0`; Python accepts 0 through 15 |\n| `RedisConfig.username` | `--redis-username` | Optional; requires a password secret |\n| `RedisConfig.password_secret` | `--redis-password-secret` | Optional secret reference |"
    },
    {
      "id": "redis-cluster",
      "title": "Redis Cluster",
      "role": "content",
      "text": "| Python field | CLI flag | Requirement or default |\n| --- | --- | --- |\n| `RedisClusterConfig.endpoints` | `--redis-cluster-startup-endpoints` | Required; CLI accepts one comma-delimited value |\n| `RedisClusterConfig.username` | `--redis-username` | Optional; requires a password secret |\n| `RedisClusterConfig.password_secret` | `--redis-password-secret` | Optional secret reference |"
    },
    {
      "id": "redis-tls",
      "title": "Redis TLS",
      "role": "content",
      "text": "| Python field | CLI flag | Requirement or default |\n| --- | --- | --- |\n| `RedisTLSConfig.mode` | `--redis-tls-mode` | `disabled`, `enabled`, `verify-ca`, `verify-full`, or `mtls` |\n| `ca_cert_path` | `--redis-tls-ca-cert-path` | Server-visible CA certificate path |\n| `ca_cert_secret` | `--redis-tls-ca-cert-secret` | CA certificate secret reference; alternative to a path |\n| `server_name` | `--redis-tls-server-name` | Optional TLS server name override |\n| `client_cert_path` | `--redis-tls-client-cert-path` | Client certificate path for mTLS |\n| `client_cert_secret` | `--redis-tls-client-cert-secret` | Client certificate secret reference for mTLS |\n| `client_key_path` | `--redis-tls-client-key-path` | Client key path for mTLS |\n| `client_key_secret` | `--redis-tls-client-key-secret` | Client key secret reference for mTLS |\n| `insecure_skip_verify` | `--redis-tls-insecure-skip-verify` | Optional; accepted only with `enabled` |\n| `min_version` | `--redis-tls-min-version` | Defaults to `1.2`; accepts `1.2` or `1.3` |"
    },
    {
      "id": "verify-registration",
      "title": "Verify registration",
      "role": "content",
      "text": "[code example]\n\nIn Python, use `providers.get(\"<redis-provider-name>\")` or `providers.list()`.\n\nRegistration resolves the configured secrets, builds the Redis client, and sends a ping before persisting the provider. Keep this health check enabled so endpoint, authentication, TLS, and network errors fail during registration. `--skip-health-check` or `skip_health_check=True` skips only the registration-time check; it doesn't disable recurring monitoring."
    },
    {
      "id": "update-safely",
      "title": "Update safely",
      "role": "content",
      "text": "| Field | Update behavior |\n| --- | --- |\n| Standalone database | Immutable |\n| Standalone host and port | Requires `force=True` or `--force` |\n| Cluster startup endpoints | Requires `force=True` or `--force` |\n| Username and password secret | Mutable |\n| TLS mode, certificate paths, server name, verification settings, and minimum version | Requires `force=True` or `--force` |\n| TLS certificate secret references | Mutable |\n\nChanging endpoints or TLS settings can interrupt materialization and serving if the new configuration isn't reachable from every runtime. Test connectivity from the Feature Form server and compute runtime before forcing the update."
    },
    {
      "id": "troubleshoot-registration",
      "title": "Troubleshoot registration",
      "role": "errors",
      "text": "| Symptom | What to check |\n| --- | --- |\n| Redis ping fails | Confirm the endpoint, route, firewall rules, authentication, and TLS settings from the Feature Form server environment |\n| Authentication validation fails | Supply a password secret when a username is set; omit the username for password-only authentication |\n| Redis Cluster registration rejects endpoints | Pass `host:port` entries as one comma-delimited CLI value, with no empty entries or repeated flag |\n| TLS verification fails | Check the TLS mode, CA chain, server name, minimum TLS version, and whether certificate paths exist in the runtime |\n| Spark rejects secret-backed TLS certificates | Mount certificate files in the Spark runtime and use the TLS path fields |\n| Existing Databricks cluster can't resolve the Redis password | Use a Databricks secret reference from a registered `databricks-secret` provider |\n\nSee [Serve features](https://redis.io/docs/latest/develop/ai/featureform/serve-features) for the serving workflow. To provision a managed deployment, see the [Redis Cloud quick start](https://redis.io/docs/latest/operate/rc/rc-quickstart)."
    }
  ],
  "examples": [
    {
      "id": "before-you-begin-ex0",
      "language": "python",
      "code": "import featureform as ff\n\nclient = ff.Client.from_env()\nproviders = client.providers(\"<workspace-id>\")",
      "section_id": "before-you-begin"
    },
    {
      "id": "register-standalone-redis-ex0",
      "language": "python",
      "code": "from featureform.types import EnvSecretRef, ProviderType, RedisConfig\n\nproviders.register(\n    name=\"<redis-provider-name>\",\n    provider_type=ProviderType.REDIS,\n    config=RedisConfig(\n        host=\"<redis-host>\",\n        port=int(\"<redis-port>\"),\n        username=\"<redis-username>\",\n        password_secret=EnvSecretRef(name=\"REDIS_PASSWORD\"),\n    ),\n)",
      "section_id": "register-standalone-redis"
    },
    {
      "id": "register-standalone-redis-ex1",
      "language": "bash",
      "code": "ff provider register <redis-provider-name> \\\n  --workspace <workspace-id> \\\n  --type redis \\\n  --redis-host <redis-host> \\\n  --redis-port <redis-port> \\\n  --redis-username <redis-username> \\\n  --redis-password-secret env:REDIS_PASSWORD",
      "section_id": "register-standalone-redis"
    },
    {
      "id": "register-redis-cluster-ex0",
      "language": "python",
      "code": "from featureform.types import EnvSecretRef, ProviderType, RedisClusterConfig\n\nproviders.register(\n    name=\"<redis-cluster-provider-name>\",\n    provider_type=ProviderType.REDIS_CLUSTER,\n    config=RedisClusterConfig(\n        endpoints=[\n            \"<redis-host-1>:<redis-port>\",\n            \"<redis-host-2>:<redis-port>\",\n        ],\n        username=\"<redis-username>\",\n        password_secret=EnvSecretRef(name=\"REDIS_PASSWORD\"),\n    ),\n)",
      "section_id": "register-redis-cluster"
    },
    {
      "id": "register-redis-cluster-ex1",
      "language": "bash",
      "code": "ff provider register <redis-cluster-provider-name> \\\n  --workspace <workspace-id> \\\n  --type redis-cluster \\\n  --redis-cluster-startup-endpoints <redis-host-1>:<redis-port>,<redis-host-2>:<redis-port> \\\n  --redis-username <redis-username> \\\n  --redis-password-secret env:REDIS_PASSWORD",
      "section_id": "register-redis-cluster"
    },
    {
      "id": "configure-tls-ex0",
      "language": "python",
      "code": "from featureform.types import (\n    EnvSecretRef,\n    ProviderType,\n    RedisConfig,\n    RedisTLSConfig,\n    RedisTLSMode,\n)\n\nproviders.register(\n    name=\"<redis-provider-name>\",\n    provider_type=ProviderType.REDIS,\n    config=RedisConfig(\n        host=\"<redis-host>\",\n        port=int(\"<redis-port>\"),\n        username=\"<redis-username>\",\n        password_secret=EnvSecretRef(name=\"REDIS_PASSWORD\"),\n        tls=RedisTLSConfig(\n            mode=RedisTLSMode.MTLS,\n            ca_cert_path=\"<runtime-visible-ca-cert-path>\",\n            server_name=\"<redis-server-name>\",\n            client_cert_path=\"<runtime-visible-client-cert-path>\",\n            client_key_path=\"<runtime-visible-client-key-path>\",\n            min_version=\"1.2\",\n        ),\n    ),\n)",
      "section_id": "configure-tls"
    },
    {
      "id": "configure-tls-ex1",
      "language": "bash",
      "code": "ff provider register <redis-provider-name> \\\n  --workspace <workspace-id> \\\n  --type redis \\\n  --redis-host <redis-host> \\\n  --redis-port <redis-port> \\\n  --redis-username <redis-username> \\\n  --redis-password-secret env:REDIS_PASSWORD \\\n  --redis-tls-mode mtls \\\n  --redis-tls-ca-cert-path <runtime-visible-ca-cert-path> \\\n  --redis-tls-server-name <redis-server-name> \\\n  --redis-tls-client-cert-path <runtime-visible-client-cert-path> \\\n  --redis-tls-client-key-path <runtime-visible-client-key-path> \\\n  --redis-tls-min-version 1.2",
      "section_id": "configure-tls"
    },
    {
      "id": "use-redis-with-databricks-ex0",
      "language": "text",
      "code": "databricks@<databricks-secret-provider-name>:<secret-scope>#<redis-password-key>",
      "section_id": "use-redis-with-databricks"
    },
    {
      "id": "verify-registration-ex0",
      "language": "bash",
      "code": "ff provider get <redis-provider-name> --workspace <workspace-id>\nff provider list --workspace <workspace-id>",
      "section_id": "verify-registration"
    }
  ]
}
