Admin gRPC

Admin gRPC

The admin and oxia coordinator services a Nova node serves, and who may call each method.

Every node serves two operator services on its client listener, beside the data plane: nova.v1.AdminPlaneService for health, drains, decommissions, credentials, and observation, and nova.v1.OxiaCoordinatorService for embedded oxia. The protos are proto/nova/v1/adminplane.proto and proto/nova/v1/oxiacoordinator.proto. Each call goes to the node you dial and never redirects. The nova CLI's node commands and credential commands call them for you.

Who may call

With --auth jwt, every method needs a token with the nova:admin marker. A few also accept nova:node, the credential a node carries for calls to its peers: RecoverStar, ReplanDispatch, ReadStreamRecords, GetStreamLiveStats, GetQueueStats, DeleteRange, TrimRange, and AdoptFence. Any other caller gets PermissionDenied, novad: admin verb requires the nova:admin marker. With off, mtls, or basic, every caller that authenticates may call every method.

Admin service

Node lifecycle

RPCWhat it does
HealthThe node's status (SERVING or DRAINING), node_id, version, zone, drained (draining with nothing left to write to object storage), and leading (streams it leads)
ListStarsThe live nodes, by node ID: ID, zone, location, address, load, and whether each is saturated or draining
DrainStart a drain, or with stop reverse one: refuse new leaderships, then hand streams off after the grace
DecommissionDeclare a node gone for good. force skips the check that a live target is drained; cool_down lets its pending denorm run on its own schedule instead of at once. While embedded oxia still moves the node's shards, the call is refused FailedPrecondition with reason STILL_DRAINING; ask again later.
FailpointArm or disarm a named fault hook; only test builds carry them

Credentials

RPCWhat it does
CreateCredentialRegister an API key with a name and scope; the key is returned once, and only its hash is stored
UpdateCredentialRename a credential or replace its scope; set at least one
RevokeCredentialDisable a credential: exchanges are refused at once, and tokens already issued last until they expire
ListCredentialsKey IDs, names, scopes, and state, in pages; never a secret

Observation

These are read-only, and any node answers them: global metadata from the metadata store, node figures from each node's stats record.

RPCWhat it does
GetClusterOverviewEvery live node with its stats, and the auditor pool's
ListStreamSummariesStream descriptors with their current leader, in pages, optionally for one bucket
ListBucketSummariesBuckets in name order, in pages, including one being deleted
GetStreamDetailOne stream's descriptor, segments (newest first, capped), trim watermark, and pending cleanup jobs
GetStreamLiveStatsThe leader's in-memory view of one stream: tail, tail time, bytes, recent-read bytes; another node asks the leader, one hop
ListAuditQueuesEach cleanup queue's bounded depth and oldest ready time
PeekAuditQueueThe first entries of one cleanup queue across its shards
ReadStreamRecordsOne page of a stream's records, for the admin reader; another leader's recent records come through one hop
ListQueueSummariesA bucket's queues with what their maps say
GetQueueStatsOne queue's backlog, claims out, due lag, and dead letters; asks each node delivering it once

Scalable streams

RPCWhat it does
ListRangesA scalable stream's range map, with each range's holder and extent
SplitRangeAsk for a range to split; accepted is false with a reason when the map refuses
MergeRangesAsk for two or more adjacent open ranges to merge, with the same answer

Between nodes

Nodes call these on each other. They are listed so their log lines and metrics make sense.

RPCWhat it does
RecoverStarA closing node asks a peer to recover its unindexed ledgers now; correctness does not depend on it
ReplanDispatchA node joined or left the dispatch ring; the receiver's dispatcher makes a pass now
DeleteRange, TrimRangeDelete or trim one range of a scalable stream at the node that leads it
AdoptFenceA range this node leads has a new parent fencing token

The admin bridge

The metrics listener serves the read-only methods as JSON at /admin/api/{Method}, for the admin UI and for scripts: Health, ListStars, GetClusterOverview, ListStreamSummaries, ListBucketSummaries, GetStreamDetail, GetStreamLiveStats, ListAuditQueues, PeekAuditQueue, ReadStreamRecords, ListCredentials, ListRanges, ListQueueSummaries, and GetQueueStats. Nothing that changes state is on the list, because the metrics listener has no authentication. The bridge needs --metrics-listen; --admin-ui=false turns it off, and --admin-ui-reader=false takes ReadStreamRecords off the list. It takes POST only, and the body is the method's request message as protojson; an empty body is the empty request. On the Compose stack, node 1's metrics listener is localhost:9191:

curl -s localhost:9191/admin/api/ListAuditQueues -d '{}'
curl -s localhost:9191/admin/api/GetQueueStats -d '{"bucket":"apps","key":"emails"}'

Oxia coordinator service

nova.v1.OxiaCoordinatorService operates the embedded oxia a node runs, for installations no Kubernetes controller manages. Only a node running embedded oxia serves it: a node in memory mode or on external oxia answers Unimplemented, and a standalone node, which has no coordinator, answers FailedPrecondition.

RPCWhat it does
HotShardsShards above the split trigger, hottest first: namespace, shard, hash range, operations a second, and the hottest bucket's share
SplitSplit one shard through the leading peer; a zero point is chosen from the shard's load
AttachServerMake embedded oxia know an external data server, the first step of the move to external oxia
PeersThe coordinators' raft group as this node sees it: address, voter, leader

From the SDKs

The Go SDK's client.NewAdmin and the TypeScript SDK's createAdmin wrap the lifecycle and credential methods, and the Go one also wraps the range methods:

MethodGoTypeScript
HealthHealth(ctx)health()
ListStarsListStars(ctx)listStars()
DrainDrain(ctx, stop)drain(stop)
DecommissionDecommission(ctx, star, opts)decommission(star, opts)
CreateCredentialCreateCredential(ctx, spec)createCredential(spec)
ListCredentialsListCredentials(ctx, after, limit)listCredentials({ after, limit })
UpdateCredentialUpdateCredential(ctx, keyID, update)updateCredential(keyId, update)
RevokeCredentialRevokeCredential(ctx, keyID)revokeCredential(keyId)
ListRangesListRanges(ctx, addr)None
SplitRangeSplitRange(ctx, addr, rng, point)None
MergeRangesMergeRanges(ctx, addr, ranges)None

In Go, opts is a client.DecommissionOptions{Force, CoolDown}, spec a client.CredentialSpec{Name, Scope}, and update a client.CredentialUpdate{Name, Scope}. In TypeScript, opts is { force, coolDown }, and spec and update are { name, scope }.

Neither client has an exchange method: to hand another application a token, call the exchange directly, as API keys and tokens shows.

On this page