For the complete documentation index, see llms.txt. This page is also available as Markdown.

create

Create an In-Memory DB Replica Set

Usage

ionosctl dbaas in-memory-db replicaset create [flags]

Aliases

For in-memory-db command:

[inmemorydb memdb imdb in-mem-db inmemdb]

For replicaset command:

[rs replica-set replicasets cluster]

For create command:

[post c]

Description

Create a new In-Memory DB Replica Set (a Redis-compatible database).

The mode is set by --replicas: 1 replica is a standalone instance; more than 1 is a leader-follower replication with one active and n-1 passive standby replicas (passive replicas fail over but do not serve reads). Up to 5 replicas are allowed.

Each replica gets its own --cores (1-16) and --ram (4-32 GB); storage is derived automatically from the RAM and persistence mode and cannot be set. The replica set attaches to exactly one network connection: --datacenter-id + --lan-id + --cidr. An initial user (--user / --password) is created for you.

There are two ways to create a replica set:

  1. Empty: pass the sizing, connection and credential flags (as in the basic example below).

  2. From a snapshot: additionally pass --snapshot-id to restore an existing point-in-time snapshot into the new replica set. The snapshot must belong to the same location.

PersistenceMode (--persistence-mode, controls how data survives restarts): None: In-memory only, nothing is persisted. Best for pure caches. AOF: Append Only File - every write is logged and replayed on restart, reconstructing the dataset. RDB: Periodic point-in-time dumps of the in-memory state. RDB_AOF: Both RDB and AOF are enabled.

EvictionPolicy (--eviction-policy, what happens when the memory limit is hit): noeviction: Never evict; write operations return an error once memory is full. allkeys-lru: Evict the least recently used keys first. allkeys-lfu: Evict the least frequently used keys first. allkeys-random: Evict random keys. volatile-lru: As allkeys-lru, but only among keys with a TTL (expire) set. volatile-lfu: As allkeys-lfu, but only among keys with a TTL (expire) set. volatile-random: Evict random keys, but only among keys with a TTL (expire) set. volatile-ttl: Evict the key with the nearest TTL first, among keys with a TTL set.

Options

Examples

Last updated