# gRPC vs REST
## The choice
- **REST (default):** `pip install pinecone`. Simpler, debuggable with curl, fine for most workloads.
- **gRPC:** `pip install "pinecone[grpc]"`. Lower per-request overhead, better for sustained high-throughput upsert and query streams.
## Rules for agents
1. Default to REST. Reach for gRPC when you have measured that REST request overhead is the bottleneck, not before.
2. gRPC changes failure modes: connection pooling, keepalives, and protobuf version conflicts (the corpus has an issue-mined skill on the protobuf 3.19.3 install conflict; pin protobuf compatibly if you hit it).
3. Control-plane calls (create/delete/describe index) stay REST either way; the choice only affects the data plane.
4. In serverless functions, weigh cold-start cost: the grpc extra adds import weight. Measure before deploying it to Lambda.
## Trap
Installing `pinecone[grpc]` because a tutorial did, then debugging obscure connection errors on a workload doing 10 queries a minute. The default exists for a reason.