Frontend
The Frontend is a stateless service that serves as the entry point for client requests in GreptimeDB. It provides a unified interface for multiple database protocols and acts as a proxy that forwards read/write requests to appropriate Datanodes in the distributed system.
Core Functions
- Protocol Support: Multiple database protocols including SQL, PromQL, MySQL, and PostgreSQL. See Protocols for details
- Request Routing: Routes requests to appropriate Datanodes based on metadata
- Query Distribution: Splits distributed queries across multiple nodes
- Response Aggregation: Combines results from multiple Datanodes
- Authorization: Security and access control validation
Architecture
Key Components
- Protocol Handlers: Handle different database protocols
- Catalog Manager: Caches metadata from Metasrv to enable efficient request routing and schema validation
- Dist Planner: Converts logical plans to distributed execution plans
- Request Router: Determines target Datanodes for each request
Request Flow
Deployment
The following picture shows a typical deployment of GreptimeDB in the cloud. The Frontend
instances
form a cluster to serve the requests from clients: