In-depth Architecture
This document explains the core architecture and concepts behind FeatureMeshd.
What is FeatureMeshd?
FeatureMeshd is a specialized proxy service that enables running FeatureQL queries against various database backends. It acts as an intermediary layer that translates feature queries into native database queries while handling connectivity and security.
System Architecture
FeatureMeshd's architecture consists of two primary components:
1. Envoy Proxy Core
Envoy provides the foundational infrastructure:
- Network traffic handling and routing
- TLS termination and certificate management
- Load balancing and connection pooling
- Health checking and monitoring
2. WebAssembly (Wasm) Plugins
Lean, focused plugins written in Rust that handle:
- Query translation to native SQL
- Query offloading to target databases
The FeatureMesh Registry
While not part of FeatureMeshd itself, the Registry is a crucial external component that:
- Validates FeatureQL syntax
- Manages feature definitions
- Handles query validation
- Provides feature metadata
Query Flow
- Client submits FeatureQL query to FeatureMeshd
- Envoy handles connection and TLS (if enabled)
- Registry validates query and provides feature definitions
- Wasm plugin translates query to native SQL
- Query is executed against target database
- Results flow back through the proxy to client
Sequence Diagram
Design Principles
Separation of Concerns
- Envoy handles all networking and TLS
- Wasm plugins focus solely on query processing
- Registry manages feature definitions and validation
Minimal Plugin Complexity
- Wasm plugins are kept lean
- Complex logic lives in the registry
- Reduces maintenance burden
Flexible Deployment
- Supports both local and cloud databases
- TLS and non-TLS configurations
- Easy local development setup
System Requirements
- Docker for containerization
- Access to FeatureMesh Registry
- Target database (local or cloud)
- TLS certificates (for secure connections)