bezeichner

⚙️ Operations

🔧 Server configuration

bezeichner server -config file:<path> loads the service configuration. The development config is a runnable example with HTTP on port 11000 and gRPC on port 12000. Start it with the README quickstart.

Startup requires health and generator blocks alongside the shared go-service configuration for transport, telemetry, and other service settings. The mapper and limits blocks are optional.

🧬 Generators

Each generator application has a non-empty name and kind. Names must be unique within the list. Pass the application name in API requests to select its generator.

generator:
  applications:
    - name: uuid
      kind: uuid
    - name: ulid
      kind: ulid

Supported kinds are uuid (UUIDv7), ksuid, ulid, xid, snowflake (Sonyflake IDs as decimal strings), nanoid, and typeid. The TypeID generator uses the application name as its native prefix. All other kinds prepend the application name and an underscore to the generated value, for example uuid_<uuid>.

For kind: typeid, choose a valid TypeID prefix as the name. Use lowercase ASCII letters and underscores, up to 63 characters, with a letter at each end. See the TypeID application-name decision.

🗺️ Mappings

Each mapper application must be non-null and have a non-empty name unique within the mapper list. The identifiers map defines its input and output values.

mapper:
  applications:
    - name: uuid
      identifiers:
        req1: resp1
        req2: resp2

Omitting mapper makes MapIdentifiers return NotFound for every application. See the API guide for how to handle individual unmapped IDs.

🚧 Request limits

limits:
  generate_count: 1000
  map_ids: 1000

generate_count caps the number of identifiers per generation request. map_ids caps the number of input IDs per mapping request. Each omitted or zero value uses the default of 1000. The development config sets both limits to 2. Clients can retrieve the effective limits with ListApplications.

🩺 Health and metrics

Both health settings must be positive durations.

health:
  duration: 1s  # Interval between checks
  timeout: 1s   # Time allowed for one online check

With the development config, the HTTP server exposes these GET routes on port 11000.

Path Purpose
/bezeichner/healthz Checks external connectivity using go-health’s online checker.
/bezeichner/livez Local liveness using the noop checker.
/bezeichner/readyz Local readiness using the noop checker.
/bezeichner/metrics Prometheus metrics when telemetry.metrics.kind is prometheus.

Use livez or readyz for process probes that must work without public egress. The gRPC health service registers bezeichner.v1.Service with the noop checker. See the health observer decision.

🐳 Deployment

Deploy Bezeichner as a shared internal service. Pin deployments to a released image tag such as alexfalkowski/bezeichner:<version>. See local Docker validation for commands to build and scan test images.

[!CAUTION] The snowflake generator uses Sonyflake defaults, which derive a machine ID from a private IPv4 address. The intended Kubernetes deployment uses normal pod networking. Re-evaluate machine-ID uniqueness for local multi-process deployments, hostNetwork, overlapping pod CIDRs, and shared ID spaces across clusters. If Sonyflake cannot derive a machine ID, such as in an IPv6-only environment, a generation request panics. Choose another generator kind for deployments that cannot meet these assumptions.

See the Snowflake machine ID decision.