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 tonats-js-kvor leave it empty to use a nats-js key value store as registry.If not running built-in nats, MICRO_REGISTRY_ADDRESSneeds to be set to the address of the nats-js cluster, which is the same value asOCIS_EVENTS_ENDPOINT. Optional: UseMICRO_REGISTRY_AUTH_USERNAMEandMICRO_REGISTRY_AUTH_PASSWORDto 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.
Registry Options: Pro and Cons
| Registry option | Good for | Drawbacks |
|---|---|---|
|
Distributed discovery across replicas and nodes; required for scale-out. |
Needs a reachable NATS server. |
|
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.