Skip to content

Managed Caches ​

Frostmoln runs managed Redis and Valkey instances — a fast in-memory key-value store for caching, sessions, rate-limiting, and queues. Instances are single-node; the platform provisions the VM, configures the server, and gives you a connection.

Choosing a type and version ​

Pick Redis or Valkey (a Redis-compatible fork — same RESP protocol and redis-cli) at create time. The create dropdown lists the launchable versions and marks the recommended one (Recommended); end-of-life and preview versions are hidden. Version statuses follow the same lifecycle as managed databases.

Sizing ​

Instance sizes use the cache.mo1.<size> flavor family (small/medium/large/xlarge/2xlarge), each with a set amount of vCPU and RAM. The flavor's RAM is the effective memory available to the cache. The create dialog shows specs and the estimated cost before you confirm.

Create an instance ​

In the portal, go to Caches → Create and choose the type, version, flavor, the VPC + subnet, and — optionally — a persistence mode and eviction policy (both explained below).

Require TLS is on by default: the instance serves TLS on its own port, 6380, and the plaintext port 6379 is closed. Turn it off (--require-tls=false in fm, require_tls = false in Terraform) only for clients that cannot use TLS; the instance then serves plaintext on 6379 beside TLS on 6380. The setting is fixed when the instance is created: to change it, create a new instance (in Terraform, changing require_tls replaces the instance; an API update that sends a different requireTls is refused with 400 REQUIRE_TLS_IMMUTABLE). See Connect over TLS.

TLS for caches is switched on separately on the platform. Until it is available, an instance is created without TLS, the portal does not offer the setting, and a create that asks for it is refused with 400 REQUIRE_TLS_UNAVAILABLE.

From the CLI ​

Lifecycle commands are type-specific (fm cache redis … / fm cache valkey …); the cross-type fm cache … group lists across types.

bash
fm cache redis instance create \
  --name app-cache \
  --version 7.4 \
  --flavor cache.mo1.small \
  --vpc my-vpc \
  --subnet my-subnet \
  --persistence rdb \
  --eviction allkeys-lru

# Valkey is symmetric (fm cache valkey instance create …)
fm cache instance list

With Terraform ​

hcl
resource "frostmoln_valkey_instance" "app" {
  name             = "app-cache"
  version          = "8.1"
  flavor_id        = "cache.mo1.small"
  vpc_id           = frostmoln_vpc.main.id
  subnet_id        = frostmoln_subnet.main.id
  persistence_mode = "rdb"
  eviction_policy  = "allkeys-lru"
}

Connect ​

After provisioning, the instance detail page reveals the connection details behind a Show Credentials button (or fm cache redis instance credentials <instance-id>):

  • Host — the instance's private address
  • Hostname — the instance's DNS name, on an instance with TLS (see Connect over TLS)
  • TLS port — 6380, on an instance with TLS
  • Port — 6379, the plaintext port; not listed when the instance requires TLS, because that port is closed
  • Username — default
  • Password — generated for you (rotatable)
  • a ready-to-use URI — rediss:// on the hostname and 6380 on an instance with TLS, redis:// on the private address and 6379 on one without

The cache is reachable from instances on the same VPC; the create flow opens the ports the instance serves in its security group.

Keep the cache inside your VPC

Connections are authenticated with the password. Keep the cache reachable only from within your VPC (the default) and never expose its ports to the internet. Store the password in Secrets, and rotate it from the detail page when needed.

Connect over TLS ​

An instance with a certificate serves TLS on 6380 (tlsPort in the API, tls_port in Terraform), with a certificate from the Frostmoln customer CA issued for the instance's hostname. Redis and Valkey work the same way. The portal shows the TLS state, the hostname and the Download CA bundle button; fm cache redis instance get (TLS Enabled, Hostname, TLS Required, TLS Port) and Terraform's tls_enabled, hostname, require_tls and tls_port report the same.

The hostname has the form <label>.cache.<vpc-label>.<tenant-label>.<org-label>.fm.internal and resolves inside the instance's VPC (see Internal DNS names). <label> comes from the instance's name at create, by the same rule as for databases, with cache for a name that has no letters or digits; a rename does not change it. Copy the hostname from the instance rather than building it yourself.

Ports. With Require TLS (the default) only 6380 is open: 6379 is closed, and the instance has no port at all (the API and fm leave it out, and Terraform's port is null). With Require TLS off, both are open: TLS on 6380 and plaintext on 6379. Pick the port by what the instance serves, not by habit: tls_enabled ? tls_port : port in Terraform.

The credentials carry the connection URI built for you; use it as given. Host stays the private IP.

text
rediss://default:<password>@<hostname>:6380/0

Connect to the hostname and verify the certificate against the CA bundle and that name. The server asks for no client certificate: the TLS connection is authenticated with the username and password, as before.

  1. Download the bundle: the Download CA bundle button, fm pki ca-bundle --file frostmoln-customer-ca.pem, or Terraform's frostmoln_ca_bundle data source. Check its fingerprint as described in Verifying Frostmoln managed-service certificates.
  2. Give it to your client as the CA certificate, connect to the hostname on 6380, and keep certificate and name checking on.
bash
# redis-cli (valkey-cli takes the same options), from an instance on the same VPC
redis-cli --tls --cacert frostmoln-customer-ca.pem --sni <hostname> \
  -h <hostname> -p 6380 --user default --askpass ping

redis-cli and valkey-cli check that the certificate chains to the bundle, but not that it was issued for the hostname: --sni only sends the name. Use them to try a connection; in an application, use a client library that checks the name too, as below.

In an application, pass the same settings to the client library. With Python's redis package:

python
import os

import redis

r = redis.Redis(
    host="<hostname>",
    port=6380,
    username="default",
    password=os.environ["REDIS_PASSWORD"],
    ssl=True,
    ssl_ca_certs="frostmoln-customer-ca.pem",
    ssl_check_hostname=True,
)
r.ping()

With Node.js ioredis:

js
import fs from 'node:fs'
import Redis from 'ioredis'

const redis = new Redis({
  host: '<hostname>',
  port: 6380,
  username: 'default',
  password: process.env.REDIS_PASSWORD,
  tls: {
    ca: fs.readFileSync('frostmoln-customer-ca.pem'),
    servername: '<hostname>',
  },
})

With Go go-redis:

go
pem, err := os.ReadFile("frostmoln-customer-ca.pem")
if err != nil {
	log.Fatal(err)
}
roots := x509.NewCertPool()
if !roots.AppendCertsFromPEM(pem) {
	log.Fatal("no certificate in the CA bundle")
}
rdb := redis.NewClient(&redis.Options{
	Addr:     "<hostname>:6380",
	Username: "default",
	Password: os.Getenv("REDIS_PASSWORD"),
	TLSConfig: &tls.Config{
		RootCAs:    roots,
		ServerName: "<hostname>",
		MinVersion: tls.VersionTLS12,
	},
})

A library that takes a URI accepts the rediss:// form above; give it the bundle as its CA certificate in the same way.

Terraform ​

  • require_tls on frostmoln_redis_instance and frostmoln_valkey_instance is optional: omit it for the default (true), or set false for clients that cannot use TLS. Changing it replaces the instance.
  • hostname, tls_enabled and tls_port are read-only, and the data sources report all four. port is null on an instance that requires TLS, so check every expression that uses it.
  • Read the bundle with the frostmoln_ca_bundle data source.
hcl
resource "frostmoln_redis_instance" "sessions" {
  name      = "sessions"
  version   = "7.4"
  flavor_id = "cache.mo1.small"
  vpc_id    = frostmoln_vpc.main.id
  subnet_id = frostmoln_subnet.main.id

  # Omitted: TLS only, on 6380. Set false only for clients that cannot use TLS;
  # changing it replaces the instance.
  # require_tls = false
}

# port is null when the instance requires TLS: pick the port from tls_enabled.
output "sessions_endpoint" {
  value = frostmoln_redis_instance.sessions.tls_enabled ? "rediss://${frostmoln_redis_instance.sessions.hostname}:${frostmoln_redis_instance.sessions.tls_port}/0" : "redis://${frostmoln_redis_instance.sessions.private_ip}:${frostmoln_redis_instance.sessions.port}/0"
}

Full attribute reference: frostmoln_redis_instance, frostmoln_valkey_instance.

Instances without TLS ​

Instances created before TLS for caches was available have no certificate and get none later: they serve plaintext on 6379 only, report requireTls and tlsEnabled as false, have no hostname, and their credentials carry a redis:// URI on the private IP. A client cannot verify who it is talking to, so connect only from instances in the same VPC. To use TLS, create a new instance and move your data to it.

An instance that requires TLS but has no certificate serves no endpoint at all: it is in status error, and its credentials list no port and no URI. Delete it and create a new one.

Persistence and eviction ​

Persistence mode controls whether data survives a restart (a persistent volume is attached when persistence is enabled):

  • rdb — periodic point-in-time snapshots (default)
  • aof — append-only log of every write
  • rdb+aof — both, for maximum durability
  • none — pure in-memory cache, nothing written to disk

Eviction policy controls what happens when memory fills up — noeviction (reject new writes, the default) or an LRU/LFU/random/TTL-based policy such as allkeys-lru. Both settings can be changed after creation from the detail page (or persistence_mode / eviction_policy in Terraform).

Cache, not a database of record

Even with persistence enabled, treat a managed cache as a cache — fast but not your durable system of record. Keep the authoritative copy of important data in a managed database.

Managing an instance ​

  • Resize storage — grow the data volume from the detail page. Grow-only (storage can never be shrunk), whole GB up to 1000 GB; the instance stays online during the resize. Changing the flavor (vCPU/RAM) is not yet available.
  • Restart — restart the server from the detail page.
  • Rotate password — generate a new password from Show Credentials.
  • Update settings — change persistence/eviction without recreating.

Limits ​

  • Single-node — no replication, failover, or cluster mode today.
  • No platform backups — persistence protects against a restart, not against deletion; deleting an instance is permanent.
  • The version is fixed for the life of an instance — to change it, create a new instance on the desired version.
  • Require TLS is fixed for the life of an instance, and an instance created without a certificate never gets one (see Instances without TLS).