Files
qdrant/lib/api/src/lib.rs
Tim Viséeandcoderabbitai[bot] 463a305404 Add routing token for deterministic read routes (#9338)
* Add routing token structure

* Implement routing token in read operation executor as per design doc

* Add TODO to glue routing token to user requests

* Implement routing header for REST API

* Source routing token from request, not from JWT token

* Implement routing token in gRPC API

* Add test

* Review remarks

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Use lower case header name to prevent panic

* Rename header to X-Qdrant-Route-Affinity

* Assert routing consistency in test on all peers

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-06-17 10:59:46 +02:00

11 lines
411 B
Rust

pub mod conversions;
pub mod grpc;
pub mod rest;
pub const HTTP_HEADER_API_KEY: &str = "api-key";
/// HTTP header / gRPC metadata key carrying the optional deterministic read
/// routing token. Requests sharing the same value are consistently routed to the
/// same shard replicas, avoiding "blinking" results caused by deferred updates.
pub const HTTP_HEADER_ROUTING_TOKEN: &str = "x-qdrant-route-affinity";