Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

gRPC Services

Kiseki exposes several gRPC services across two network ports. Data-path services run on port 9100. The advisory service runs on a separate listener at port 9101 (isolated runtime, ADR-021).


LogService

Port: 9100 (data fabric) Provider: kiseki-log (via kiseki-server) Consumers: Composition, View stream processors, Gateway, Client

RPCTypeDescription
AppendDeltaUnaryAppend a delta to a shard. Returns the assigned sequence number. Commits via Raft majority before ack (I-L2).
ReadDeltasServer streamingRead a range of deltas from a shard. Used by view stream processors for materialization.
TruncateLogUnaryTrigger delta GC up to the minimum consumer watermark. Returns the new GC boundary.
ShardHealthUnaryQuery shard health, Raft state, and replication status.
SplitShardUnaryTrigger mandatory shard split at a given boundary.
SetMaintenanceUnaryEnable or disable maintenance mode on a shard (I-O6).
CompactShardUnaryTrigger compaction (header-only merge, I-O2).

KeyManagerService

Port: Internal network (dedicated key manager cluster) Provider: kiseki-keymanager (via kiseki-keyserver) Consumers: Storage nodes (chunk encryption), Gateway, Client

RPCTypeDescription
FetchMasterKeyUnaryFetch the master key for a given epoch. Used at node startup and rotation.
RotateKeyUnaryRotate system or tenant keys. Creates a new epoch.
CryptoShredUnaryDestroy tenant KEK, rendering all tenant data unreadable.
FullReEncryptUnaryTrigger full re-encryption of a tenant’s data under new keys.
FetchTenantKekUnaryFetch tenant KEK for wrapping/unwrapping operations.
CheckKmsHealthUnaryCheck tenant KMS provider connectivity.
KeyManagerHealthUnaryQuery key manager cluster health and Raft state.

System DEK derivation is local (HKDF, no RPC). Only master key fetch and tenant KEK operations require network calls (ADR-003).


ControlService

Port: Management network Provider: kiseki-control Consumers: Admin CLI, storage nodes, advisory runtime

Tenant management

RPCDescription
CreateOrgCreate a new organization (top-level tenant)
CreateProjectCreate a project within an organization
CreateWorkloadCreate a workload within an org or project
DeleteOrg / DeleteProject / DeleteWorkloadRemove tenant hierarchy nodes

Namespace and policy

RPCDescription
CreateNamespaceCreate a tenant-scoped namespace
SetComplianceTagsSet compliance regime tags (inherit downward)
SetQuotaSet resource quotas at org/project/workload level
SetRetentionHoldCreate a retention hold on a namespace or composition
ReleaseRetentionHoldRelease an active retention hold

IAM

RPCDescription
RequestAccessCluster admin requests access to tenant data
ApproveAccessTenant admin approves access request
DenyAccessTenant admin denies access request

Operations

RPCDescription
SetMaintenanceModeEnable/disable cluster-wide maintenance mode
ListFlavors / MatchFlavorQuery and match deployment flavors

Federation

RPCDescription
RegisterFederationPeerRegister a remote Kiseki cluster for async replication

Advisory policy

RPCDescription
SetAdvisoryPolicyConfigure profiles, budgets, and state per scope
TransitionAdvisoryStateTransition advisory state (enabled/draining/disabled)
GetEffectiveAdvisoryPolicyCompute effective policy for a workload (min across hierarchy)

WorkflowAdvisoryService

Port: 9101 (data fabric, separate listener) Provider: kiseki-advisory (via kiseki-server, isolated tokio runtime) Consumers: Native client, any authorized tenant caller

RPCTypeDescription
DeclareWorkflowUnaryDeclare a new workflow with profile, initial phase, and TTL. Returns a WorkflowRef handle and authorized pool handles.
EndWorkflowUnaryEnd a declared workflow. Triggers audit summary and GC of workflow state.
PhaseAdvanceUnaryAdvance to the next phase. Phase order is monotonic (I-WA13).
GetWorkflowStatusUnaryQuery current workflow state, phase, and budget usage.
AdvisoryStreamBidirectional streamingMultiplexed channel: hints in (client to storage), telemetry out (storage to client).
SubscribeTelemetryServer streamingSubscribe to specific telemetry channels for a workflow.

Advisory stream message types

Inbound hints (client to storage):

  • Access pattern declaration
  • Prefetch range (up to 4096 tuples per hint, I-WA16)
  • Affinity pool preference (via opaque pool handles, I-WA19)
  • Priority class (within policy-allowed maximum)
  • Retention intent
  • Dedup intent
  • Collective checkpoint announcement
  • Deadline hint

Outbound telemetry (storage to client):

  • Backpressure signal (ok / soft / hard severity with retry-after)
  • Placement locality class (local-node / local-rack / same-pool / remote / degraded)
  • Materialization lag
  • Prefetch effectiveness
  • QoS headroom
  • Hotspot detection (caller-owned compositions only)

StorageAdminService (ADR-025)

Port: Management network Provider: kiseki-server Consumers: Cluster admin, SRE (read-only role)

RPCTypeDescription
ClusterStatusUnaryCluster-wide status summary
ListDevices / GetDeviceUnaryQuery storage devices
AddDevice / RemoveDeviceUnaryAdd or remove a device (removal requires Removed state)
EvacuateDevice / CancelEvacuationUnaryTrigger or cancel device evacuation
ListPools / GetPool / PoolStatusUnaryQuery affinity pools
CreatePool / SetPoolDurability / SetPoolThresholdsUnaryManage pool configuration
RebalancePool / CancelRebalanceUnaryTrigger or cancel pool rebalance
ListShards / GetShard / GetShardHealthUnaryQuery shard state
SplitShard / SetShardMaintenanceUnaryShard management
SetTuningParams / GetTuningParamsUnaryRuntime tuning parameters
DrainNodeUnaryDrain all shards and chunks from a node
TriggerScrub / RepairChunk / ListRepairsUnaryData integrity operations
DeviceHealthServer streamingLive device health events
IOStatsServer streamingLive I/O statistics
DeviceIOStatsServer streamingPer-device I/O statistics

DiscoveryService

Port: 9100 (data fabric) Provider: kiseki-server Consumers: Native client

Used by the native client to discover shards, views, and gateways from the data fabric without requiring direct control plane access (I-O4, ADR-008).


Protocol binding

  • Protobuf definitions: proto/kiseki/v1/*.proto
  • Generated code: kiseki-proto crate
  • Workflow ref header: x-kiseki-workflow-ref-bin (16 raw bytes as gRPC binary metadata, not a proto field, per ADR-021)