Overview
Profiles enable multi-tenancy in Lasso by providing isolated routing configurations with independent chains, providers, rate limits, and metrics. Each(profile, chain) pair runs in an isolated supervision tree while sharing provider infrastructure for efficiency.
Profile Structure
Profiles are YAML files inconfig/profiles/ with frontmatter metadata:
Frontmatter Fields
name (required)- Display name for the profile
- Used in dashboard and logs
- URL-safe identifier
- Used in API routes:
/rpc/profile/:slug/:chain - Must be unique across all profiles
- Requests per second limit
- Default: 100
- Maximum burst size for rate limiting
- Default: 500
Profile-Scoped Configuration
Each profile can configure:Chains
Multiple blockchain networks with independent provider sets:Providers
Provider configuration per chain:Environment Variables
Provider URLs support${ENV_VAR} substitution:
Monitoring Configuration
Per-chain health monitoring settings:Selection Configuration
Provider eligibility filtering:WebSocket Configuration
Subscription management and failover:Profile Isolation
Each(profile, chain) pair runs in an isolated supervision tree:
Isolated Resources
Per (profile, chain):- Independent circuit breaker state
- Isolated metrics and benchmarking
- Separate rate limits
- Dedicated WebSocket subscriptions
- Independent routing decisions
Shared Resources
To optimize resource usage, provider infrastructure is shared across profiles: Shared across profiles (keyed byinstance_id):
- Provider instances (same URL + chain = same instance)
- Circuit breakers (HTTP and WebSocket)
- WebSocket connections
- Block height tracking
- Health probes
https://eth.llamarpc.com for Ethereum will share:
- The same WebSocket connection
- The same circuit breakers
- The same block height data
- Routing policies
- Metrics aggregation
- Rate limits
URL Routing
Profiles are accessed via URL paths:Profile-Specific Routes
Default Profile Routes
Routes without/profile/:profile use the “default” profile:
The “default” profile must exist in
config/profiles/default.yml. Lasso validates this at startup.Profile Loading
Profiles are loaded at application startup:Configuration Backend
File Backend (default):- Loads from
config/profiles/*.yml - Hot-reload not supported (requires restart)
- Dynamic profile management
- Hot-reload support
- Multi-tenant isolation
Example Profiles
Production Profile
High rate limits, premium providers:Development Profile
Lower rate limits, free public providers:Analytics Profile
Archival data, specific method routing:Provider Capabilities
Profiles can declare provider capabilities for method filtering and error classification:unsupported_categories: Block entire RPC method categoriesunsupported_methods: Block specific method names
max_block_range: Maximum block range foreth_getLogsmax_block_age: Maximum block age for state queriesblock_age_methods: Methods subject tomax_block_age
- Per-provider error rules evaluated top-to-bottom
- First match wins
- Affects retry behavior and circuit breaker penalties
Profile Validation
Lasso validates profiles at startup:Required Validations
Default Profile Exists:Profile Status
Get profile information at runtime:Profile Lifecycle
Startup
ConfigStore.load_all_profiles()loads YAML filesCatalog.build_from_config()creates provider instance mappingsstart_shared_infrastructure()starts instance supervisors and probesstart_all_chains()starts(profile, chain)supervisors
Runtime
Profiles are read-only at runtime. Configuration changes require application restart.Shutdown
Graceful shutdown drains in-flight requests:- 30-second grace period for in-flight requests
- Circuit breaker state preserved in ETS (survives GenServer restarts)
- Benchmark metrics persisted to disk
Next Steps
Routing Strategies
Configure provider selection strategies
Provider Selection
Understand the 7-stage filter pipeline
Circuit Breakers
Configure fault tolerance thresholds
Architecture
Explore the OTP supervision tree