Introduction
Qdrant provides a native gRPC API for high-performance vector operations. The gRPC interface offers significant performance advantages over REST, particularly for bulk operations and streaming scenarios.Why gRPC?
gRPC provides several advantages for vector database operations:Performance
Binary protocol with efficient serialization reduces network overhead by 30-50% compared to JSON
Type Safety
Strongly-typed Protocol Buffer definitions prevent runtime errors
Streaming
Bidirectional streaming enables efficient batch operations
Code Generation
Auto-generate client libraries in 10+ languages from proto files
Protocol Structure
Qdrant’s gRPC API is defined across multiple protocol buffer files:- qdrant.proto - Main service definition and health checks
- collections_service.proto - Collection management operations
- points_service.proto - Point CRUD and search operations
- collections.proto - Collection configuration messages
- points.proto - Point structure and query messages
Service Endpoints
The main gRPC services available:Collections Service
Points Service
Connection Setup
Using Python Client
Using Go Client
Using Rust Client
Authentication
For authenticated gRPC connections, include API key in metadata:Performance Considerations
Benchmarks
Typical performance improvements with gRPC vs REST:| Operation | REST | gRPC | Improvement |
|---|---|---|---|
| Single point upsert | 2ms | 1.5ms | 25% faster |
| Batch upsert (1000 points) | 150ms | 85ms | 43% faster |
| Search (top 10) | 5ms | 3.5ms | 30% faster |
| Scroll (1000 points) | 120ms | 70ms | 42% faster |
Error Handling
gRPC uses standard status codes:OK (0)- SuccessINVALID_ARGUMENT (3)- Invalid request parametersNOT_FOUND (5)- Collection or point not foundALREADY_EXISTS (6)- Resource already existsRESOURCE_EXHAUSTED (8)- Rate limit exceededFAILED_PRECONDITION (9)- Operation precondition failedUNAVAILABLE (14)- Service temporarily unavailable
Consistency Guarantees
Configure read consistency per request:ALL- All replicas must respondMAJORITY- Majority of replicasQUORUM- Half + 1 replicas
Message Size Limits
Proto Files Location
Find proto definitions in the Qdrant repository:Next Steps
Collections
Manage collections via gRPC
Points
Work with points and vectors
Python Client
Official Python client library
Rust Client
Official Rust client library