How storytold/voder-proxy works
voder-proxy is an HTTP reverse proxy/load balancer for the voder TTS service. Clients send speech requests or other traffic; the proxy decodes speech payloads, selects a voice-specific backend (or default route), retries speech requests, and returns backend responses. It also provides a health endpoint and optional New Relic transaction logging. The graph follows the sampled Rust source and README; backend services and New Relic are external, and no unsampled implementation details are inferred.
Main entry points: main.rs Request dispatcher · speak_proxy.rs Speech retry handling · newrelic_logger.rs New Relic logger · api.rs Speech request decoding
Components 15
HTTP ingress
- HTTP listener
src/main.rs - Request dispatcher
src/main.rs - Health response
src/main.rs
Speech proxy
- Backend router
src/main.rs - Speech request decoding
src/api.rs - Speech retry handling
src/speak_proxy.rs - Internal request builder
src/speak_proxy.rs - Response annotation
src/speak_proxy.rs - Proxy error responses
src/api.rs
Configuration and telemetry
- Server bootstrap
src/main.rs - Proxy configuration
proxy_configs.toml - New Relic logger
src/newrelic_logger.rs
Other components
- HTTP clients
- TTS backends
- New Relic
Connections 18
- HTTP clients → HTTP listener: sends requests
src/main.rs - Server bootstrap → Proxy configuration: loads settings
src/main.rs - Server bootstrap → Backend router: builds routes
src/main.rs - Server bootstrap → HTTP listener: starts server
src/main.rs - HTTP listener → Request dispatcher: dispatches requests
src/main.rs - Request dispatcher → Speech retry handling: routes speech
src/main.rs - Request dispatcher → Health response: answers health
src/main.rs - Request dispatcher → Backend router: selects fallback
src/main.rs - Request dispatcher → New Relic logger: starts transactions
src/main.rs - Speech retry handling → Speech request decoding: decodes payload
src/speak_proxy.rs - Speech retry handling → Backend router: selects voice host
src/speak_proxy.rs - Speech retry handling → Internal request builder: retries request
src/speak_proxy.rs - Internal request builder → TTS backends: forwards speech
src/speak_proxy.rs - Speech retry handling → Response annotation: annotates success
src/speak_proxy.rs - Speech retry handling → Proxy error responses: returns retry error
src/speak_proxy.rs - Request dispatcher → TTS backends: forwards unmatched traffic
src/main.rs - Server bootstrap → New Relic logger: configures logger
src/main.rs - New Relic logger → New Relic: records transactions
src/newrelic_logger.rs