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
| RPC | What it does |
|---|---|
Health | The 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) |
ListStars | The live nodes, by node ID: ID, zone, location, address, load, and whether each is saturated or draining |
Drain | Start a drain, or with stop reverse one: refuse new leaderships, then hand streams off after the grace |
Decommission | Declare 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. |
Failpoint | Arm or disarm a named fault hook; only test builds carry them |
Credentials
| RPC | What it does |
|---|---|
CreateCredential | Register an API key with a name and scope; the key is returned once, and only its hash is stored |
UpdateCredential | Rename a credential or replace its scope; set at least one |
RevokeCredential | Disable a credential: exchanges are refused at once, and tokens already issued last until they expire |
ListCredentials | Key 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.
| RPC | What it does |
|---|---|
GetClusterOverview | Every live node with its stats, and the auditor pool's |
ListStreamSummaries | Stream descriptors with their current leader, in pages, optionally for one bucket |
ListBucketSummaries | Buckets in name order, in pages, including one being deleted |
GetStreamDetail | One stream's descriptor, segments (newest first, capped), trim watermark, and pending cleanup jobs |
GetStreamLiveStats | The leader's in-memory view of one stream: tail, tail time, bytes, recent-read bytes; another node asks the leader, one hop |
ListAuditQueues | Each cleanup queue's bounded depth and oldest ready time |
PeekAuditQueue | The first entries of one cleanup queue across its shards |
ReadStreamRecords | One page of a stream's records, for the admin reader; another leader's recent records come through one hop |
ListQueueSummaries | A bucket's queues with what their maps say |
GetQueueStats | One queue's backlog, claims out, due lag, and dead letters; asks each node delivering it once |
Scalable streams
| RPC | What it does |
|---|---|
ListRanges | A scalable stream's range map, with each range's holder and extent |
SplitRange | Ask for a range to split; accepted is false with a reason when the map refuses |
MergeRanges | Ask 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.
| RPC | What it does |
|---|---|
RecoverStar | A closing node asks a peer to recover its unindexed ledgers now; correctness does not depend on it |
ReplanDispatch | A node joined or left the dispatch ring; the receiver's dispatcher makes a pass now |
DeleteRange, TrimRange | Delete or trim one range of a scalable stream at the node that leads it |
AdoptFence | A 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.
| RPC | What it does |
|---|---|
HotShards | Shards above the split trigger, hottest first: namespace, shard, hash range, operations a second, and the hottest bucket's share |
Split | Split one shard through the leading peer; a zero point is chosen from the shard's load |
AttachServer | Make embedded oxia know an external data server, the first step of the move to external oxia |
Peers | The 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:
| Method | Go | TypeScript |
|---|---|---|
Health | Health(ctx) | health() |
ListStars | ListStars(ctx) | listStars() |
Drain | Drain(ctx, stop) | drain(stop) |
Decommission | Decommission(ctx, star, opts) | decommission(star, opts) |
CreateCredential | CreateCredential(ctx, spec) | createCredential(spec) |
ListCredentials | ListCredentials(ctx, after, limit) | listCredentials({ after, limit }) |
UpdateCredential | UpdateCredential(ctx, keyID, update) | updateCredential(keyId, update) |
RevokeCredential | RevokeCredential(ctx, keyID) | revokeCredential(keyId) |
ListRanges | ListRanges(ctx, addr) | None |
SplitRange | SplitRange(ctx, addr, rng, point) | None |
MergeRanges | MergeRanges(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.