Skip to main content

Key-Value Store (Redis Compatible)

Our Key-Value Store is a Redis compatible in memory key-value database used as a distributed cache and message broker. On-Demand Key-Value Stores offer limited configuration options. If more extensive settings are required, use our Key-Value Stores as a Managed Service.

Getting Started

You can use nctl or Cockpit, our web interface to get started:

  1. Create a New Service directly in Cockpit to get started. Don't forget to allow your IP to connect to the instance.
  2. Retrieve the credentials from the overview page. Note the FQDN and token. The user "default" will be used.
  3. Connect to the newly created instance:
    REDISCLI_AUTH="${TOKEN}" redis-cli --tls --insecure -h ${FQDN}

The resource can be managed via Cockpit, our command-line tool nctl or by directly using the API.

Billing is automated based on the resources used. Nine's automated management ensures the smooth operation of the service.

Updates and Maintenance Windows

Security and software updates are generally performed during the NKE maintenance windows.

Therefore, short service interruptions may occur during this maintenance window without prior notice.

Pricing

nine-key-value-store-256mbnine-key-value-store-1gbnine-key-value-store-2gbx gb
RAM256 MB1 GB2 GBx GB
Storage space512 MB2 GB4 GBx * 2 GB
Monthly feesx *

Note that the storage space cannot be decreased and is based on the configured size of RAM.

Pricing for On-Demand Key-Value Stores start at . Additional charges are based on the resources used.

Configuration options

On-Demand Services come with a sensible base configuration that is suitable for most setups. They also provide the ability to change certain configuration options. Adjusting these configuration options can result in a restart of the instance.

The instance can be customized with the following configuration options:

Name

The name of the instance can be freely chosen, but must be unique. Once created, the name cannot be changed.

Location

Depending on available resources, instances can be created in two locations within the "ColoZüri" data center or the "NTT" data center in Rümlang. The location cannot be changed later.

Version

Currently, the latest version 7 of Redis is being used to power On-Demand Key-Value Stores. Due to licence changes and the associated uncertainty about the future development of Redis, we have decided to use a Redis-compatible alternative as a replacement in the near future.

Allowed IP addresses

Defines the IPv4 addresses and address ranges that are allowed to establish connections to the service. Access from our Kubernetes products (NKE and GKE) and from deplo.io is enabled by default.

The access restriction can be adjusted at any time. Adjustments are made non-disruptively moments after the form is submitted.

maxmemory Policy

The configuration option maxmemory_policy defines what should happen when the available memory is exhausted. By default, the policy allkeys-lru is used, which keeps the most recently used keys and removes the least recently used (LRU) keys. Adjusting the max-memory policy will cause the instance to restart.

An overview of all policies can be found in the Redis documentation.

RAM (Memory Size)

The amount of memory to configure for the key-value store.

The amount of disk space required increases linearly with this value. Note that reducing the memory size does not reduce the amount of disk space used.

Adjusting the memory size will cause the instance to restart.

Connection

tip

As per Allowed IP Addresses, you may need to allow additional IP's to connect to your instance.

The instances are accessible via the standard Redis port 6379.

User

A user "default" with a password is created for connection authentication when the instance is created. Since "default" is the standard user, only the password is required when connecting. Check the Getting Started section for details on how to retrieve the credentials.

TLS

The on-demand services only accept connections secured by TLS. Depending on the client or library used, it may be necessary to explicitly enable TLS.

The TLS certificate is self-signed. In addition to enabling TLS transport encryption, you may need to provide the certificate authority used for validation.

You can retrieve the CA either through Cockpit or nctl:

  1. Open the On-Demand Services overview and select the respective service.
  2. The CA is available under the resource's Certificate tab.

Backups

Stored keys and values are persisted across instance restarts, but no restorable backups are created.

Redis Input/Output Tools (RIOT)

Redis Input/Output Tools (RIOT) is a command-line utility to get data in and out of a Redis-compatible document store.

It can be used to import and export files, but also to migrate from one to another instance. The easiest way to run RIOT, is through the provided docker image riotx/riot.

Migrate Instance

RIOT can be used to migrate all keys from one to another instance. Use the following command to migrate all keys of DB 0 from $SOURCE_HOST to $TARGET_HOST.

tip

As per Allowed IP Addresses, you may need to allow additional IP's to connect to your instance.

SOURCE_HOST=""
SOURCE_TOKEN=""
TARGET_HOST=""
TARGET_TOKEN=""
podman run --rm riotx/riot replicate \
--source-tls \
--source-insecure \
--target-tls \
--target-insecure \
--source-pass="$SOURCE_TOKEN" \
--target-pass="$TARGET_TOKEN" \
--threads 4 \
"redis://$SOURCE_HOST/0" \
"redis://$TARGET_HOST/0"