Lunar Proxy
The Lunar Proxy component enables users to address challenges related to 3rd party APIs. The Lunar API proxy enables functionalities for full discovery of all 3rd Party APIs, easy detection and diagnosis of performance issues, and the ability to fix and remediate in production.
Requests sent to Lunar Proxy are forwarded to the API provider.
Lunar Proxy receives HTTP/S requests forwarded by Lunar's Interceptor(s) and forwards them to the API provider.
How the Lunar Proxy Works
When a diagnosis or remedy policy is defined on an endpoint, its transaction data is sent to a Stream Processing Offload Agent
.
This data is processed asynchronously to generate insightful information.
For example, the response_based_throttling
remedy blocks clients from overconsuming APIs and imposing stricter quotas. It achieves this by storing and serving rate limit responses for the remainder of the rate limit window. The caching
remedy allows responses to be cached based on request similarity.
Even when no policies are defined, Lunar Proxy seamlessly forwards traffic and generates Discovered Endpoint Metrics, including latency and status code metrics grouped by endpoint.
Failsafe Mechanism
Lunar's Failsafe Mechanism is designed to ensure continuous traffic flow, even if something goes wrong with the Lunar Engine. In the unlikely event that the Lunar Engine crashes, all traffic will be automatically routed directly to the Provider, ensuring that your application's operation remains unaffected.
This approach guarantees uninterrupted traffic flow, minimizing any potential delays or disruptions.
By default, the Failsafe Mechanism is enabled in the Lunar Engine.
To disable it, set the following environment variable:
LUNAR_ENGINE_FAILSAFE_ENABLED="false"
Installation
- To install Lunar Proxy, follow the steps in our Installation Guide
Configuration
- To configure Lunar Proxy, refer to our Configuration Guide
Troubleshooting and FAQs
- If you encounter any issues or require additional assistance, please consult our Frequently Asked Questions or shoot us an email at info@lunar.dev.