BlobService
BlobStore service: large objects stored, read and deleted by id.
An object is split into chunks of up to 256KB, each identified by the SHA-256 digest of its bytes. Every upload is its own blob with its own id, even when another blob holds the same bytes; identical chunks are stored once underneath and shared. Deleting a blob ends its hold on its chunks; the storage of chunks no blob, retained history or reader still needs is reclaimed in the background.
A member of a group with other members refuses uploads and deletes with FAILED_PRECONDITION, reason BLOB_NOT_REPLICATED: blob bytes are held only on the member that writes them.
Proto source
Transport
All methods are available via:
- gRPC on port 7080 — native high-performance API
- REST/JSON on port 7081 — HTTP/JSON transcoding via embedded structured-proxy
Methods
UploadBlob
Upload an object as a stream of chunks and store it as a new blob.
HTTP: POST /v1/blobs
Request: stream BlobChunk
| Field | Type | Description |
|---|---|---|
data | bytes | Chunk data (up to 256KB per message). On upload the messages' data, concatenated in order, is the object; their sizes need not match the stored chunk size. |
sequence | uint32 | Chunk sequence number (0-based, for ordering verification). |
operation | OperationRef | Upload only, on the first message: the client operation the upload carries out. The upload then takes effect at most once however the call is retried, and every attempt names the same blob, so a retry after a lost answer never leaves a second blob behind. A retry of an operation that already took effect stores nothing and is refused with FAILED_PRECONDITION, reason OPERATION_SETTLED; ErrorInfo metadata blob_id names the blob the operation stored. Absent stores the upload unbound. Set on a later message, it is refused with INVALID_ARGUMENT. |
Response: UploadBlobResponse
| Field | Type | Description |
|---|---|---|
blob_id | string | The blob's id: 32 lowercase hex digits naming this upload. Two uploads of the same bytes get different ids. |
chunk_ids | string[] | The SHA-256 digest of each chunk in object order (hex, 64 chars each), repeated where the object repeats a chunk. |
total_size | uint64 | Total size of the uploaded blob in bytes. |
dedup_chunks | uint32 | Number of distinct chunks whose bytes the store already held and now shares instead of storing again. |
DownloadBlob
Download a blob, returned as a stream of chunks in object order. The whole blob is read as it stood when the download began, however slowly the stream is consumed.
HTTP: GET /v1/blobs/{blob_id}
Request: DownloadBlobRequest
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier returned from UploadBlob. |
Response: stream BlobChunk
| Field | Type | Description |
|---|---|---|
data | bytes | Chunk data (up to 256KB per message). On upload the messages' data, concatenated in order, is the object; their sizes need not match the stored chunk size. |
sequence | uint32 | Chunk sequence number (0-based, for ordering verification). |
operation | OperationRef | Upload only, on the first message: the client operation the upload carries out. The upload then takes effect at most once however the call is retried, and every attempt names the same blob, so a retry after a lost answer never leaves a second blob behind. A retry of an operation that already took effect stores nothing and is refused with FAILED_PRECONDITION, reason OPERATION_SETTLED; ErrorInfo metadata blob_id names the blob the operation stored. Absent stores the upload unbound. Set on a later message, it is refused with INVALID_ARGUMENT. |
DeleteBlob
Delete a blob. Chunks other blobs share stay readable through them.
HTTP: DELETE /v1/blobs/{blob_id}
Request: DeleteBlobRequest
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier returned from UploadBlob. |
Response: DeleteBlobResponse
| Field | Type | Description |
|---|---|---|
chunks_deleted | uint32 | Chunks whose storage this call reclaimed. Reclamation happens in the background once nothing needs a chunk any more, so a delete reports 0; its effect is that the blob no longer holds its chunks. |
GetBlobMeta
Get blob metadata (chunk count, total size) without downloading.
HTTP: GET /v1/blobs/{blob_id}/meta
Request: GetBlobMetaRequest
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier returned from UploadBlob. |
Response: BlobMeta
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier. |
total_size | uint64 | Total size in bytes. |
chunk_count | uint32 | Number of chunks, counting repeats. |
chunk_ids | string[] | The SHA-256 digest of each chunk in object order (hex, 64 chars each). |
Types
BlobChunk
A single blob chunk in a streaming upload/download.
| Field | Type | Description |
|---|---|---|
data | bytes | Chunk data (up to 256KB per message). On upload the messages' data, concatenated in order, is the object; their sizes need not match the stored chunk size. |
sequence | uint32 | Chunk sequence number (0-based, for ordering verification). |
operation | OperationRef | Upload only, on the first message: the client operation the upload carries out. The upload then takes effect at most once however the call is retried, and every attempt names the same blob, so a retry after a lost answer never leaves a second blob behind. A retry of an operation that already took effect stores nothing and is refused with FAILED_PRECONDITION, reason OPERATION_SETTLED; ErrorInfo metadata blob_id names the blob the operation stored. Absent stores the upload unbound. Set on a later message, it is refused with INVALID_ARGUMENT. |
BlobMeta
Blob metadata.
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier. |
total_size | uint64 | Total size in bytes. |
chunk_count | uint32 | Number of chunks, counting repeats. |
chunk_ids | string[] | The SHA-256 digest of each chunk in object order (hex, 64 chars each). |
DeleteBlobRequest
Request to delete a blob.
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier returned from UploadBlob. |
DeleteBlobResponse
Response after blob deletion.
| Field | Type | Description |
|---|---|---|
chunks_deleted | uint32 | Chunks whose storage this call reclaimed. Reclamation happens in the background once nothing needs a chunk any more, so a delete reports 0; its effect is that the blob no longer holds its chunks. |
DownloadBlobRequest
Request to download a blob.
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier returned from UploadBlob. |
GetBlobMetaRequest
Request for blob metadata.
| Field | Type | Description |
|---|---|---|
blob_id | string | Blob identifier returned from UploadBlob. |
OperationRef
A reference to one client operation: what a client persists before sending a write and sends again with every retry of it, on any connection and to any member.
| Field | Type | Description |
|---|---|---|
issuer | bytes | The logical client: 16 bytes the client chooses once and keeps across its restarts (a random value, or a digest of a stable application identity). Independent clients use different issuers; a connection, session or server is not an issuer. |
incarnation | uint64 | The issuer's incarnation the number belongs to, from EnrollIssuerResponse. |
sequence | uint64 | The operation's number within the incarnation, allocated by the client: starting at EnrollIssuerResponse.next_sequence, each new write takes the next number, and a retry of a write keeps its number. Numbers are an identity, not an execution order: writes with different numbers may run concurrently and complete in any order. |
deployment | bytes | The deployment that enrolled the incarnation, 16 bytes, from EnrollIssuerResponse.deployment. A server of another deployment refuses the reference with INVALID_ARGUMENT, reason FOREIGN_OPERATION, rather than admit it as a new operation. |
UploadBlobResponse
Response after a complete blob upload.
| Field | Type | Description |
|---|---|---|
blob_id | string | The blob's id: 32 lowercase hex digits naming this upload. Two uploads of the same bytes get different ids. |
chunk_ids | string[] | The SHA-256 digest of each chunk in object order (hex, 64 chars each), repeated where the object repeats a chunk. |
total_size | uint64 | Total size of the uploaded blob in bytes. |
dedup_chunks | uint32 | Number of distinct chunks whose bytes the store already held and now shares instead of storing again. |
