System Architecture
Understand the internal components and data flow loops driving log-based Kubernetes scaling.
Component Breakdown
LogStrata relies on three core microservices deployed inside your cluster context:
Fluentd DaemonSets running on every node harvest container stdout stream logs directly from the node filesystem.
Logs are structured into indexed documents in Elasticsearch or OpenSearch databases to allow fast aggregation queries.
The core control plane queries the index database at tick intervals to evaluate custom scaling threshold policies.
Data Flow Pipeline
How a log entry turns into an infrastructure adjustment:
- Log Generation: An application pod handles a checkout request and logs:
{"path":"/checkout", "latency_ms":1200, "status":200}. - Ingestion & Storage: The Fluentd DaemonSet forwards the parsed JSON document to Elasticsearch, where it is indexed in real-time.
- Controller Tick Evaluation: Every 10 seconds, LogStrata executes an aggregation query:
SELECT P95(latency_ms) WHERE path='/checkout'over the last 30s. - Threshold Violation: The query returns
1200ms. This violates the configured800mslimit. - Kubernetes PATCH Action: LogStrata sends a patch API request to increase target deployment replica counts.
Scale-Down Cooldowns & Failsafes
To avoid "thrashing" (rapid scaling up and down), LogStrata enforces strict cooldown windows. When a scale-up is completed, scale-down requests are ignored for a default cooldown period (e.g. 90 seconds). This allows newly scheduled pods to start up and stabilize cluster metrics.