Repository navigation
Description
For the Valkey Core Team Sync (weekly Monday sync), 2026-09-21. This is an alignment document, not a full feature proposal. It asks the TSC to align on two architecture points, and to agree on one coordination item, for the ValkeyLargeObj large-object module. Implementation status, provider mechanics, buffer sizes, and test plans are out of scope for this alignment issue.
Purpose
ValkeyLargeObj is a Valkey module for large opaque objects, such as KV-cache tensors, embeddings, and blobs. The goal is to host the module in the valkey-io namespace, with AWS as the sponsor and the maintainer. The valkey-io namespace matters for a specific reason. It makes the module an official, vendor-neutral part of Valkey that is not tied to EFA, to AWS, or to another provider. AWS builds the first adapter and maintains the project, and any other RDMA provider can add an adapter and use the same module. This community hosting is a goal that the TSC must still approve. It is not a decision that exists today. The module needs two capabilities to succeed, and this document asks the TSC to align on the architecture for each. The first capability is high-bandwidth transfer of large objects between client memory and the server. The module gets this through a one-sided RDMA data path. The second capability is lower storage cost for large objects. If the module keeps all object bytes in DRAM, the memory cost per node is too high, so the module needs local storage below DRAM to hold the bytes at lower cost. The two alignment points below follow from these two capabilities. Point 1 covers the RDMA API model. Point 2 covers the local storage and tiering boundary for V1. Each point keeps a Proposal, a Why, and a Concerns and Response part. A scope table and the TSC asks follow.
Point 1: Transport-independent RDMA API model
Proposal
ValkeyLargeObj splits a large-object transfer into two paths. Standard RESP commands form the control path. A separate one-sided RDMA path carries the object bytes out of band. The server, through the module, starts every byte transfer. The client passes its memory descriptors as request data on the command. A descriptor gives the remote key (rkey) and the memory address (remote_addr). The current commands are these:
| Command | Arguments | Behavior |
|---|---|---|
| LO.HELLO | <client_rdma_endpoint> |
Registers the client endpoint. Returns the server endpoint data. |
| LO.GET | <key> <rkey> <remote_addr> |
Blocks the RESP client. The server does a one-sided write of the object into client memory. Returns the byte count. |
| LO.SET | <key> <len> <rkey> <remote_addr> |
Blocks the RESP client. The server does a one-sided read of len bytes from client memory, then stores the object. Returns OK. |
The endpoint bytes are provider-specific and opaque. The API model, the descriptor fields, and the completion semantics are provider-independent. The module reports the command as complete only after the byte transfer completes, and it reports a transfer failure as a command error. Each adapter maps its provider completion events to these semantics. Provider code sits behind a transport adapter that the module owns. AWS EFA is the first adapter. EFA is not part of the API contract. The model must support other RDMA providers through new adapters.
GET control flow:
- The client sends LO.GET on the RESP connection with the key, the rkey, and the remote_addr.
- The module finds the object metadata in the keyspace on the main thread.
- The module blocks the RESP client through the existing blocked-client API and returns no immediate reply. The Valkey main thread continues to serve other clients.
- A module thread reads the object bytes from cache or file storage, then does a server-initiated one-sided write into client memory at remote_addr.
- After the write completes, the module unblocks the client and returns the byte count.
SET control flow:
- The client sends LO.SET on the RESP connection with the key, the len, the rkey, and the remote_addr.
- The module blocks the RESP client through the existing blocked-client API and returns no immediate reply. The Valkey main thread continues to serve other clients.
- A module thread takes a registered buffer, then does a server-initiated one-sided read of len bytes from client memory at remote_addr.
- The module stores the object in file storage, and in the DRAM cache when applicable.
- After storage completes, the module unblocks the client and returns OK.
In both flows, the module blocks only the RESP client. The Valkey main thread is free while storage and RDMA run on module threads. The object bytes never travel in the RESP reply. The final RESP reply only unblocks the client and reports the result.
Why
A normal RESP reply copies the payload through the socket buffer and through server memory more than one time. This cost grows with the object size. A one-sided RDMA transfer moves the bytes directly between client memory and a registered server buffer, so it removes the socket copy for the object. The control path stays on standard commands, so the client keeps normal Valkey authentication and request framing for the control message.
The server starts each transfer, and the client does not pull the data itself. The module knows when the storage or cache data is ready and when its registered buffers are ready. It controls the buffer lifetime and the backpressure. It acknowledges the command only after the transfer completes. A client-pull model would expose the server memory descriptors to the client. It would also make readiness and lifetime coordination part of the public API. Server initiation keeps that coordination inside the module.
Valkey already has RDMA support in src/rdma.c, but it does not meet this need. That code is a connection transport for the RESP byte stream. It moves RESP bytes over its own negotiated ring buffers. Its one-sided operations are internal to that stream transport and target those ring buffers. The receiver then copies from the ring into the RESP path. It does not place a payload one-sided, per command, into arbitrary client memory such as GPU VRAM, and the payload still enters the RESP buffer and copy path. So the module needs its own RDMA data path.
Concerns and Response
Concern: the server acts on a client-supplied key and address, so the transfer trusts client input.
Response: the descriptor is request data. Server initiation moves the trust boundary. It does not remove it. V1 defines the transfer-authorization model, and this is not an open item. A client may start LO.GET or LO.SET only when its authenticated Valkey connection has ACL permission for that command and for the target key. ACL stays the authority for the command and the key. The client may then transfer to or from any memory region for which it supplies a valid RDMA endpoint or session, an address, and an rkey. Possession of the valid descriptor is the intended memory-access capability, and V1 does not add a separate memory-ownership identity check. The RDMA provider and the NIC enforce the registered region bounds, so a transfer cannot read or write outside the registered region. LO.HELLO binds the endpoint and session setup to the current RESP connection, but it does not grant Valkey key access. This model does not assume TLS.
The server also must not write past the client buffer on a GET, because LO.GET carries no length. The V1 model assumes that the client has enough free registered memory to hold the full object before LO.GET starts. To support this assumption, the design must define the supported object-size limit and how the client learns or validates the required capacity. The team must resolve the object-size limit and the capacity check before launch. Chunked or ranged transfer is a later effort, not a V1 requirement.
Concern: does the control path need a session, or can it stay stateless?
Response: V1 uses LO.HELLO to establish a per-client session and to exchange endpoints. A later stateless variant could carry the client endpoint on each command instead. That choice changes the control-path arguments, but not the two-path model, so V1 keeps the session and defers the question.
Point 2: Local storage and tiering boundary
Proposal
ValkeyLargeObj stores each large object in local storage below DRAM, so a node does not hold every object byte in DRAM. The proposed V1 architecture uses one filesystem file per large object. The file is the authoritative copy of the object. DRAM is a cache above the file. A GET may serve the object from the file and may cache file data in DRAM, but the authoritative object does not move between tiers. ValkeyLargeObj is purpose-built for individual large objects, and a client reaches each object only through the explicit LO.* commands. The module does not provide broadly transparent tiering across all Valkey values. This narrow scope is the reason V1 uses a separate storage and tiering engine from the general Valkey Data Tiering effort. The reason for the separate engine is that the storage implementation and semantics differ, not that the module and core boundary differ.
Why
RFC 27 targets smaller objects. General Data Tiering serves ordinary values, and its default backend is a log-structured FlashCache over a fixed-capacity backing file with background reclamation. This design fits ordinary values well. Large objects fit this log-structured cache poorly, because large records make log space management and reclamation less suitable. RFC 27 does not state a byte threshold and lists size as one policy attribute only, so the smaller-value target is an inference from the design, not a stated fact.
For this reason, ValkeyLargeObj uses one filesystem file per large object. The file is the authoritative copy, and DRAM holds an optional cache copy above the file. When ValkeyLargeObj drops the DRAM copy, it does not write the object to disk, because the file already exists. This behavior reduces implementation and eviction complexity, because the engine never needs a spill-and-promote path for the authoritative bytes. The general Data Tiering backend instead spills the authoritative value from DRAM to the file and later promotes it back into DRAM, so DRAM holds the authoritative value when the key is hot. The two engines therefore differ in the source of truth, the on-disk layout for large files, the cache behavior, the failure and recovery path, and the delete path.
With one filesystem file per large object, the authoritative object stays in one disk file, even while DRAM can hold an additional cache copy. The planned nodes have about a 100:1 NVMe-to-DRAM capacity ratio, which makes this concurrent disk-and-DRAM copy acceptable for V1. For these reasons, V1 uses a separate storage and tiering engine for large objects. The team will reevaluate this separate-engine decision as general Data Tiering matures, and the two designs can improve or converge later.
The module and core boundary is a supporting fact for V1. ValkeyLargeObj holds object metadata in a module data type and uses existing module APIs, which are the data-type API, the command API, the allocator API for memory accounting, and the blocked-client API for off-thread transfers. So V1 needs no new Valkey-core execution hook and no new public core API. This boundary keeps V1 low-risk, and it supports the hosting goal, because a module with no new core hook is easy for the valkey-io namespace to host and for AWS to maintain. It is a supporting fact, not the reason for the separate tiering engine.
Concerns and Response
Concern: two tiering designs in Valkey duplicate effort.
Response: the designs share structure, because both keep the key in the keyspace and place the value in a lower tier. ValkeyLargeObj recommends convergence at the vocabulary and at the abstract lifecycle and interface seams: async get, put, and delete, plus completion, capacity, statistics, and snapshot or recovery hooks. ValkeyLargeObj recommends a joint interface study for these seams. It defers a shared ABI and a shared storage layout until both designs mature, because RFC 27 is Proposed only and the storage layouts differ today.
Concern: will ValkeyLargeObj need a core hook later?
Response: it can, if a later version adds byte persistence, replication, or transparent interception. V1 does not add these, so the team can revisit the boundary if the scope changes.
V1 and Deferred Scope
| Item | V1 or deferred | Note |
|---|---|---|
| Two-path model: RESP control path plus one-sided RDMA data path | V1 | n/a |
| Module starts the transfer. GET writes client memory, SET reads client memory | V1 | n/a |
| Client memory descriptors as request data | V1 | n/a |
| Transport adapter that the module owns | V1 | n/a |
| EFA as the first adapter | V1 | Not part of the API contract |
| Other RDMA providers | Deferred | Each provider needs a new adapter |
| File-per-object storage, file authoritative, DRAM as cache | V1 | Proposed architecture |
| Metadata as a module data type, and no new core hook or public core API | V1 | n/a |
| Shared vocabulary and interface seams with Data Tiering | V1 | Reference, then joint study |
| Shared storage ABI and layout with Data Tiering | Deferred | Both designs must mature first |
| Client holds the full object in free registered memory before GET | V1 | Assumed V1 model |
| Supported object-size limit and client capacity check | V1 | Must define before launch |
| Chunked or ranged transfer | Deferred | Later effort, not a V1 requirement |
| Transfer authorization: ACL for command and key, valid RDMA descriptor for memory | V1 | Descriptor possession is the memory-access capability |
| Control-path session or stateless choice | Deferred | Does not change the model |
| Byte persistence, replication, core eviction | Deferred | Out of V1 scope |
TSC Asks
The module owner asks the TSC to align on two architecture points and to agree on one coordination item.
Architecture ask 1: align on the transport-independent RDMA API model in Point 1. This covers the two paths, the module-initiated transfer, the client memory descriptors as request data, the provider code behind a module-owned adapter, and EFA as the first adapter rather than part of the contract. V1 assumes that the client holds the full object in free registered memory before LO.GET starts. The design must define the supported object-size limit and how the client learns or validates the required capacity, and the team must resolve both before launch. V1 also defines the transfer-authorization model. ACL permission on the authenticated connection authorizes the command and the target key, and a valid RDMA endpoint or session, address, and rkey authorizes the memory access. This is a V1 position, not an open item.
Architecture ask 2: align that ValkeyLargeObj V1 uses a separate storage and tiering engine, justified by the storage semantics in Point 2 (a file source of truth with DRAM as a cache, versus DRAM as source of truth with spill and promote), and that V1 needs no new core execution hook and no new public core API because the module uses a module data type and existing module APIs.
Coordination item: agree to a shared storage vocabulary and to abstract lifecycle and interface seams with Data Tiering now, agree to a joint interface study next, and defer a shared ABI and storage layout until both designs mature.
Activity
stockholmux commentedon Sep 21, 2026
Is the irony intended? Something that uses a high amount of memory called
LO.*...stockholmux commentedon Sep 21, 2026
I would like to get @pizhenwei weigh in on this.
zuiderkwast commentedon Sep 21, 2026
In the core team meeting today, we decided to accept it as a repo under the valkey-io organization. The API will initially be experimental/beta until the module is releasing an 1.0 version and commits to maintaining it.
We discussed naming and found the word BLOB (Binary Large OBject) to be a good fit, so we aligned on
BLOB.GET,BLOB.SET, etc.In the fullness of time, this functionality may be provided by the core using the regular string datatype, with data tiering of large string objects configurable to work in a similar way and some non-RESP RDMA support to allow the same zero-copy transfer, but that's far ahead and the module will be a good way to start.
Replication and RDB persistence are open problems. These may be out of scope for some KV-caching use cases. But we shouldn't fail silently. It's better to crash if replication is enabled than to silently omit these keys from replication.
pizhenwei commentedon Sep 22, 2026
Hi, there is no
lengthargument from GET command. I have questions:key? then the client side MUST prepare a memory region bigger than the size of valueAny memory registered by RDMA will be not forkable any more, this breaks the RDB, I'm also confused about this part.
kevinmcgehee commentedon Sep 22, 2026
Hi @pizhenwei - thanks for the feedback. The original plan was that a client that does not provide a sufficiently-sized buffer would receive an error message with the object size. In order to prevent the error path when a client does not want to guess the size, we can introduce an
LO.INFOcommand to allow obtaining an object size up front. The server will still write the value in one go to one allocation. Long-term, we want to allow the client to supply a list of buffers (so that it doesn't need one contiguous allocation) and to allow pagination/ranged queries so it can do multiple successive requests to obtain the same object.It's not necessarily true that RDMA registrations do not support fork. On modern systems the kernel can copy pages registered for RDMA, but it does so eagerly at the time of the fork, which could be expensive. In our design, memory is used for both transfer buffers and for a cache of the objects on disk. Therefore, we don't need to inspect any of these pages in the child, and can use the authoritative copy on disk. When we support snapshot, we just wouldn't copy those pages over to the child. We'd still need a good way to snapshot the data on disk, which is harder to coordinate.
pizhenwei commentedon Sep 23, 2026
Hi @kevinmcgehee
There is only a single
<key> <rkey> <remote_addr>from GET command, this means that only the contiguous memory with the same RKEY could be used, would you please give me more hints about this design? do you need<key> <rkey> <remote_addr> <rkey> <remote_addr> <rkey> <remote_addr> ...schema?I took a look at the Linux 7.1 code, and only mlx5 supports ODP. Is this within the plan? In addition, the RDMA CI tests use RXE. Since RXE does not support ODP, CI will not be able to cover such a design.
The connection framework is designed as stream style with read/write/writev/sync_write/sync_read/sync_readline, then we need to introduce read_mem/write_mem into it?
I'm looking forward to seeing the memory style APIs, I suppose it could be implement by TCP too, I expect it will also bring a significant performance improvement, because such an API can avoid parsing large chunks of memory from the RESP protocol and avoid many streaming operations.
zuiderkwast commentedon Sep 23, 2026
Providing the allocating size together with the remote address seems good/necessary. Just as we can often represent a binary string internally as a pair
(char *ptr, size_t len), we can do the same for a remote memory area.Even if you provide LO.INFO, the object can logically be changed by another client between LO.INFO and LO.GET. It can be best-effort though, if it's combined with the remote allocation size in the GET. (Btw, comparing to the regular string datatype, there's the
STRLENcommand.)kevinmcgehee commentedon Sep 23, 2026
Yes, we plan to support this pattern to allow multiple memory blocks, each with a maximum length, for both SET and GET.
We plan to support EFA from AWS only for V1, but welcome other provider implementations. We're still figuring out the CI story. We can test libfabric with a TCP provider so can run on normal hardware. For real EFA testing, we are investigating being able to run on specific hardware within CI to validate.
When we look to incorporate this into core, we'd need to expand the connection interface. For now, all the RDMA operations are encapsulated inside the module, so the operations appears to core as blocking commands. We want to validate the approach and performance in a module before proposing a more generalized solution for all datatypes.
Agreed; this is a miss in the design doc above. This parameter will be present in the implementation.
Yes, and if we want to support pagination / incremental consumption there are similar race conditions that can occur that we would need to design for. The race condition you mentioned is important why the client must provide the maximum length they expect to be written even if they have fetched the object size in advance; we don't want the server to write past the boundary onto other valid, registered memory in the same block.
kevinmcgehee commentedon Sep 23, 2026
To add - this module is complementary to the existing RDMA support inside of core Valkey. Its focus is different: we want to do one-sided RDMA push/pull rather than the two-sided RESP communication. You can theoretically run the two together: the core RDMA implementation for the control path, and the direct copy of this module large values.
KarthikSubbarao commentedon Sep 29, 2026
Here are the proposed names to be more consistent across various sites:
valkey-large-objectLOB.*largeobjlarge-obj(Needs to be 9 characters in len due to a core valkey enforcement)largeobjlargeobj.create/largeobj.update(for publishing events when an object is created and updated accordingly)Our thinking is that "Large object" spells out the intent more clearly than an acronym like
BLOBwhich readers will not understand unless expanded. So our proposal is to standardize this usage across the various customer user visible sites.The one place it can't be spelled in full is the command prefix (since we generally keep it short), so we use LOB.* as the natural short form of "large object.". We evaluated BLOB.* for just the command prefix, but it would have been the one lone inconsistency against a "large object" theme. LOB.* stays close in intent while keeping the whole surface consistent. The alternative would be to have every customer visible name include
BLOB- however, this has the con mentioned above.Wanted to check to see if this sounds good or if there are any concerns regarding this naming
zuiderkwast commentedon Sep 29, 2026
We can change it, but AFAIR we did make a major decision on BLOB. We can change it but formally we'd need another decision/ack from TSC members to do that.
Personally I think BLOB is the perfect name, because it's a well-know from SQL. BLOB is a well-known datatype in SQL databases. See https://www.sparkcodehub.com/sql/programmability/blob-data-types or the docs of various databases (https://www.postgresql.org/docs/current/datatype-binary.html#DATATYPE-BINARY). Leaving out the "B" (for binary) misses the point about being a binary/string type. Without it, a large object can mean any type to me, for example a large sorted set.
kevinmcgehee commentedon Sep 29, 2026
@zuiderkwast We had discussed both LOB and BLOB command prefixes in the meeting, with a preference for BLOB. Do you propose the module be named
valkey-binary-large-object? Orvalkey-blob? We wanted to avoid using acronyms everywhere for clarity.zuiderkwast commentedon Oct 1, 2026
valkey-blobI believe BLOB is a well-known word/acronym just like JSON. It may depend on your background if you're familiar with it or not, but it's certainly older than JSON.
Apart from being a standard SQL datatype, there are more usages:
Btw, blob is also a word (non-acronym) meaning something like a vaguely-shaped large mass. There are multiple meanings and usages: https://en.wiktionary.org/wiki/blob
zuiderkwast commentedon Oct 1, 2026
This is a good approach, but I think there's a difference between inventing new acronyms (LOB, LO) and using already established ones (BLOB).
An alternative could be to use just OBJECT.GET/SET (or LARGE-OBJECT.GET/SET, etc.). Amazon S3 describes itself as an "object storage", but in Valkey, we have various types of objects. All values are objects in some sense, so the word "object" on its own doesn't say much. Being binary and large is what seems to distinguish this one.
cnuthalapati commentedon Oct 1, 2026
@zuiderkwast
I think we should keep
valkey-large-objectas the module name, even if we useBLOB.*for the command namespace. This keepsLarge Objectas the broader module boundary, whileBLOB.*accurately names the binary datatype/API exposed today.My concern with
valkey-blobas the module name is that it suggests generic blob or file storage, which can create expectations around arbitrary file storage, durability, or object-store-style semantics. Those are not what this module is trying to provide, and they are not what makes the module distinct.Valkey strings are already binary-safe. The novel part here is not simply storing binary data. The problem this module addresses is handling objects large enough that the normal RESP path, DRAM-only storage, and associated copying become inefficient. The module introduces shared infrastructure for large objects, including out-of-band RDMA transfer and DRAM/NVMe tiering. That infrastructure is broader than the BLOB datatype exposed today.
large-objectalso gives us a cleaner extensibility model. If we later support other large-object types or representations, for example CLOB-like objects, they should be able to reuse the same transfer and tiering infrastructure rather than requiring a separate module for each datatype.BLOBcan remain one datatype/API exposed by the broader Large Object module.There is also precedent for separating the module name from the command namespace.
valkey-searchexposesFT.SEARCH, notSEARCH.SEARCH. So command-prefix consistency alone doesn't seem like a strong reason to narrow the module itself tovalkey-blob.Suggestion for naming would therefore be:
valkey-large-objectlargeobjlarge-objlargeobjBLOB.*nmvk commentedon Oct 1, 2026
I agree with
BLOB:*for the current datatype. I prefervalkey-large-objectfor module name, Given how quickly this area is evolving the broader name leaves room for the related capabilities to grow within the same module, without tying its identity to initial datatype. Goal would be to keep the scope open as design evolves.feat(core): integrate glide-rdma into glide-core (#7412)
feat(ffi): integrate rdma into ffi (#7458)
feat(python): add RDMA get/set to the glide-sync client (#7464)