How vespa-engine/vespa works
Vespa is a distributed platform for search, inference, and organizing text, vectors, tensors, and structured data. A user deploys an application and its data, then queries Vespa for ranked or aggregated results; the repository also includes operational clients and service-health tooling. The graph preserves configuration modeling, document processing, query semantics, storage, and metrics as distinct concerns. Most runtime connections are dashed because the supplied excerpts do not establish their callers; unsampled subsystems are represented only where the tree or README supports them.
Main entry points: root.go Vespa CLI · query.go Query commands · document.go Document commands · DeployState.java Deployment state
Components 16
Clients and operations
- Vespa CLI
client/go/internal/cli/cmd/root.go - Deploy commands
client/go/internal/cli/cmd/deploy.go - Query commands
client/go/internal/cli/cmd/query.go - Document commands
client/go/internal/cli/cmd/document.go
Application configuration
- Deployment state
config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java - Config producer tree
config-model/src/main/java/com/yahoo/config/model/producer/TreeConfigProducer.java - Service model
config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java - Host resources
config-model/src/main/java/com/yahoo/vespa/model/HostResource.java
Query and document serving
- Query semantics
container-search/src/main/java/com/yahoo/prelude/semantics/engine/RuleEngine.java - Document processing
docproc/src/main/java/com/yahoo/docproc/impl/DocprocService.java - Search runtime
container-search/src/main/java/com/yahoo/search/dispatch/rpc/CompressService.java
Distributed storage
- Storage runtime
storageserver/src/apps/storaged/storage.cpp - Storage context
storage/src/vespa/storage/storageserver/storagenodecontext.h
Service observability
- Service metrics
metrics-proxy/src/main/java/ai/vespa/metricsproxy/service/VespaService.java - Storage metrics
metrics/src/main/java/ai/vespa/metrics/StorageMetrics.java
Other components
- Application developer
Connections 14
- Application developer → Vespa CLI: uses
README.md - Vespa CLI → Deploy commands: dispatches
- Application developer → Deployment state: deploys application
README.md - Deployment state → Config producer tree: builds configuration
- Config producer tree → Service model: organizes services
config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java - Host resources → Service model: reports service info
config-model/src/main/java/com/yahoo/vespa/model/HostResource.java - Application developer → Query commands: queries
README.md - Query commands → Search runtime: sends query
- Search runtime → Query semantics: rewrites query
- Application developer → Document commands: feeds documents
README.md - Document commands → Document processing: submits documents
- Document processing → Storage runtime: persists updates
- Storage runtime → Storage context: uses context
- Service metrics → Storage metrics: collects metrics