Registry

The registry lets all Infinite Scale services find and communicate with each other. This page explains the available registry types and when to use them. You should be familiar with the oCIS service architecture.

3 min read · Level: intermediate · Last updated for oCIS 9.0.0-rc.1 on 25.10.2026

Introduction

How Infinite Scale services discover each other through a service registry, and which registry types (nats-js-kv, memory) are available. The registry is defined via Extended Environment Variables. Also see the nats service which provides an embedded nats based registry.

Available Registries

The type of registry to use can be configured with the MICRO_REGISTRY environment variable and subsequent ones. Supported values are:

  • nats-js-kv (Default)
    Set the environment variable to nats-js-kv or leave it empty to use a nats-js key value store as registry.

    If not running built-in nats, MICRO_REGISTRY_ADDRESS needs to be set to the address of the nats-js cluster, which is the same value as OCIS_EVENTS_ENDPOINT. Optional: Use MICRO_REGISTRY_AUTH_USERNAME and MICRO_REGISTRY_AUTH_PASSWORD to authenticate with the nats cluster.
  • memory
    Setting the environment variable to memory starts an in-memory registry. This only works with the developer version of Infinite Scale.

How the Registry Is Used

Every service registers itself in the registry on startup and looks up the other services it needs to talk to. In a single binary, the embedded NATS server provides the registry. In a Docker Compose or Helm deployment, a shared NATS server provides the registry across all replicas.

flowchart LR subgraph Reg["Service registry (nats-js-kv)"] R[("NATS JetStream key-value store")] end P["proxy"] -- "register / lookup" --- R D["ocdav"] -- "register / lookup" --- R G["gateway"] -- "register / lookup" --- R S["storage-users"] -- "register / lookup" --- R

Registry Options: Pro and Cons

Registry option Good for Drawbacks

nats-js-kv (NATS JetStream key-value)

Distributed discovery across replicas and nodes; required for scale-out.

Needs a reachable NATS server.

memory (in-memory)

Zero configuration, no external dependency.

Only works within one process; not for production or scale-out.

Default in all deployment types is nats-js-kv. Use memory only for single-process development.

FAQ

Which Registry Does Infinite Scale Use by Default?

The default is nats-js-kv, a NATS JetStream key-value store. You only need to set MICRO_REGISTRY_ADDRESS when the NATS server is not the built-in one, which is the same address as OCIS_EVENTS_ENDPOINT.

Can I Use mDNS, etcd or Consul as the Registry?

No. Those registry types were deprecated and removed. If your configuration still sets MICRO_REGISTRY to mdns, nats, etcd or consul, switch to nats-js-kv. See the migration notes.

Does the Registry Work in a Single Binary Without Extra Setup?

Yes. When you run ocis server, the embedded NATS server provides the registry automatically, so no extra configuration is needed.