README
ยถ
๐ฅท FluxNinja Aperture
Aperture is an observability-driven load management platform designed for classifying, scheduling, and rate-limiting API traffic in cloud applications. Built upon a foundation of observability and a global control plane, it offers a comprehensive suite of load management capabilities that enhance the reliability and performance of cloud applications while also optimizing resource utilization.
Aperture seamlessly integrates with existing control points such as gateways, service meshes, and application middlewares. Moreover, it offers SDKs for developers to establish control points around specific features or code sections inside applications
โ๏ธ Features
Aperture provides a variety of advanced load management features:
- Adaptive service protection: Enhance resource utilization and safeguard against abrupt service overloads with an intelligent queue at the entry point of services. This queue dynamically adjusts the rate of requests based on live service health, thereby mitigating potential service disruptions and ensuring optimal performance under all load conditions.
- Global quota management: Maintain compliance with external API quotas with a global token bucket and smart request queuing. This feature regulates requests aimed at external services, ensuring that the usage remains within prescribed rate limits and avoids penalties or additional costs.
- Workload prioritization: Safeguard crucial user experience pathways and ensure prioritized access to external APIs even during high-load conditions by strategically prioritizing workloads. This is achieved through the use of declarative policies that label and prioritize workload requests, such as API calls. By employing weighted fair queuing for scheduling, Aperture ensures a fair distribution of resources that aligns with the business value and urgency of requests.
- Load-based auto-scaling: Eliminate the need for costly over-provisioning and enhance efficiency with Aperture's load-based auto-scaling. Aperture's policies are expressed as circuit graphs that continuously track deviations from service-level objectives and calculate recovery or escalation actions. Auto-scaling can be implemented as an escalation that triggers based on load throttling signal.
- Distributed rate-limiting: Safeguard APIs from potential abuse with Aperture's high-performance, distributed rate limiter. This feature enforces per-key limits based on fine-grained labels, ensuring precise control and prevention of excessive usage.
- Percentage rollouts: Enable teams to gradually release new features to a subset of users, without impacting the rest of the system. Aperture provides automated load ramping functionality, allowing for a safe and controlled increment of load to new features or API endpoints. This feature continuously monitors for potential performance issues and includes an automatic response mechanism to dial back load in case of a performance regression. This proactive approach minimizes service disruptions and maintains consistent performance, even when rolling out new features.
๐๏ธ Architecture
-
๐ฆ Aperture Agents are typically deployed next to the services and provide high-performance load management capabilities. They are responsible for scheduling and rate-limiting incoming requests based on the policies defined in the Aperture Controller. In addition, they also collect service health and flow metrics.
-
๐ค Aperture Controller executes observability-driven control policies and configures Aperture Agents. The control policies are expressed as circuit graphs consisting of interconnected signal processing blocks. The Aperture policies provide a programmable way to tailor sophisticated control policies to match any application's needs.
๐ Getting Started
๐ฎ Playground
To try Aperture in a local Kubernetes environment, refer to Playground docs.
๐๏ธ Installation
To install the Aperture system, follow the Installation guide.
๐ Use Cases
- Use Cases section in Aperture documentation.
๐ฅ๏ธ Slide Decks
- Observability-driven Load Management deck covers the overview and use-cases of Aperture.
๐ฅ Videos
- SREcon'23 APAC | Mastering Chaos: Achieving Fault Tolerance with Observability-Driven Prioritized Load Shedding
- Chaos Carnival 2023 | Graceful Degradation: Keeping The Lights On When Everything Goes Wrong
- Conf42 Chaos Engineering 2023 | Graceful Degradation: When All Goes Wrong
- Demo | How Concurrency Limits Help Protect Against Cascading Failures
- Explainer | Build Indestructible Applications with Aperture Flow Control
๐ท Contributing
Reporting bugs helps us improve Aperture to be more reliable and user-friendly. Include all the required information to reproduce and understand the bug you are reporting. Follow helper questions in the bug report template to make it easier. If you see a way to improve Aperture, use the feature request template to create an issue.
To contribute code, read the Contribution guide.
Directories
ยถ
Path | Synopsis |
---|---|
gen/proto/go/aperture/autoscale/kubernetes/controlpoints/v1
Package controlpointsv1 is a reverse proxy.
|
Package controlpointsv1 is a reverse proxy. |
gen/proto/go/aperture/discovery/entities/v1
Package entitiesv1 is a reverse proxy.
|
Package entitiesv1 is a reverse proxy. |
gen/proto/go/aperture/distcache/v1
Package distcachev1 is a reverse proxy.
|
Package distcachev1 is a reverse proxy. |
gen/proto/go/aperture/flowcontrol/checkhttp/v1
Package checkhttpv1 is a reverse proxy.
|
Package checkhttpv1 is a reverse proxy. |
gen/proto/go/aperture/flowcontrol/controlpoints/v1
Package controlpointsv1 is a reverse proxy.
|
Package controlpointsv1 is a reverse proxy. |
gen/proto/go/aperture/flowcontrol/preview/v1
Package previewv1 is a reverse proxy.
|
Package previewv1 is a reverse proxy. |
gen/proto/go/aperture/fluxninja/v1
Package fluxninjav1 is a reverse proxy.
|
Package fluxninjav1 is a reverse proxy. |
gen/proto/go/aperture/info/v1
Package infov1 is a reverse proxy.
|
Package infov1 is a reverse proxy. |
gen/proto/go/aperture/peers/v1
Package peersv1 is a reverse proxy.
|
Package peersv1 is a reverse proxy. |
gen/proto/go/aperture/policy/language/v1
Package languagev1 is a reverse proxy.
|
Package languagev1 is a reverse proxy. |
gen/proto/go/aperture/status/v1
Package statusv1 is a reverse proxy.
|
Package statusv1 is a reverse proxy. |
cmd
|
|
aperture-agent
Package main Agent
|
Package main Agent |
aperture-agent/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
aperture-controller
Package main Controller
|
Package main Controller |
aperture-controller/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
docs
|
|
extensions
|
|
fluxninja/extconfig
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
sentry/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
api
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group
|
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group |
api/agent/v1alpha1
+kubebuilder:object:generate=true +groupName=fluxninja.com
|
+kubebuilder:object:generate=true +groupName=fluxninja.com |
api/common
+kubebuilder:object:generate=true
|
+kubebuilder:object:generate=true |
api/controller/v1alpha1
+kubebuilder:object:generate=true +groupName=fluxninja.com
|
+kubebuilder:object:generate=true +groupName=fluxninja.com |
api/policy/v1alpha1
+kubebuilder:object:generate=true +groupName=fluxninja.com
|
+kubebuilder:object:generate=true +groupName=fluxninja.com |
pkg
|
|
agent-functions/agents
Server-side for handling agent functions
|
Server-side for handling agent functions |
agent-functions/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
agent-info
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
discovery/kubernetes/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
discovery/static/config
+kubebuilder:validation:Optional +kubebuilder:object:generate=true
|
+kubebuilder:validation:Optional +kubebuilder:object:generate=true |
dist-cache/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
etcd
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
google/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
jobs/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
metrics
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
net/grpc
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
net/grpcgateway
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
net/http
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
net/listener
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
net/tlsconfig
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
otelcollector/adapterconnector
Package adapterconnector adapts OTEL signals between pipelines.
|
Package adapterconnector adapts OTEL signals between pipelines. |
otelcollector/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
otelcollector/leaderonlyreceiver
Leader-only-receiver wraps any metrics receiver and starts it only when agent is a leader.
|
Leader-only-receiver wraps any metrics receiver and starts it only when agent is a leader. |
peers/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
policies/autoscale/kubernetes
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
policies/controlplane/runtime/tristate
tristate is a helper package for tri-state boolean logic, which is used for logical combinator components.
|
tristate is a helper package for tri-state boolean logic, which is used for logical combinator components. |
policies/flowcontrol/selectors
Companion package for github.com/fluxninja/aperture/api/gen/proto/go/aperture/policy/language/v1 containing conversions of proto-generated struct into golang ones and other helpers.
|
Companion package for github.com/fluxninja/aperture/api/gen/proto/go/aperture/policy/language/v1 containing conversions of proto-generated struct into golang ones and other helpers. |
policies/flowcontrol/service/preview/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
policies/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
profilers
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
prometheus/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
rpc
Server-to-client reverse RPC
|
Server-to-client reverse RPC |
utils
mapstruct is similar in idea to mitchellh/mapstructure, with a difference that values are assumed to always be created through json serialization.
|
mapstruct is similar in idea to mitchellh/mapstructure, with a difference that values are assumed to always be created through json serialization. |
watchdog
Ported from - https://github.com/raulk/go-watchdog
|
Ported from - https://github.com/raulk/go-watchdog |
watchdog/config
+kubebuilder:validation:Optional
|
+kubebuilder:validation:Optional |
test
|
|