Skip to main content
Version: 1.0.x

Core Settings

These key settings enhance the security, flexibility, and performance of the Lunar.dev API Consumption Gateway. While not all settings are mandatory, they are highly recommended to ensure your API traffic is managed securely and efficiently.

While not all configurations are mandatory, they are highly recommended to ensure optimized communication, secure connections, and reliable traffic management. Below is a breakdown of each configuration, why it matters, and how it is relevant to your system setup.


Security and Communication Configurations

Securing and structuring communication between clients, gateways, and API providers is essential for maintaining data integrity and performance.

The following configurations help ensure your API traffic is managed safely and efficiently.

  • mTLS Configuration

    Mutual TLS (mTLS) guarantees that both the client and server authenticate each other before establishing a connection. This is critical in environments that require end-to-end encryption and secure communication.

    Use this configuration when you need to enforce secure communication between your application and the API provider. It’s particularly valuable in highly regulated industries where data security is a priority.

  • SSL Communication with Lunar Gateway

    SSL encryption secures the traffic between the Lunar Gateway and external API providers. This protects sensitive data from being exposed during transmission.

    Implement SSL communication to ensure encrypted traffic between your infrastructure and third-party APIs, preventing unauthorized access to data.


Traffic Structuring Configurations

To efficiently manage and optimize traffic flow, it’s essential to structure and segment your API traffic. These configurations help organize traffic routes and provide flexibility in routing and request management.

  • Path Parameters Configuration

    Defining reusable URL patterns makes managing API endpoints more efficient. This is particularly useful when handling large numbers of similar API requests.

    Apply this configuration to manage path parameters and reduce redundancy when managing multiple API endpoints. This is especially helpful for simplifying complex URL structures.

  • Identify Your API Consumer

    Identifying and segmenting API requests is crucial for monitoring usage and traffic patterns across different applications or environments.

    Use the x-lunar-consumer-tag header to label API requests based on the application or user, providing granular insights and tracking capabilities for multi-tenant environments.


Runtime Configurations

Optimizing runtime settings is vital for ensuring smooth operations, especially during high traffic or system shutdowns. These configurations focus on fine-tuning the behavior of Lunar.dev components.

  • Environment Variables

    Configuring environment variables allows you to tailor the operation of the Lunar Gateway and Interceptors based on your infrastructure’s specific needs.

    Use environment variables to adjust runtime behaviors like connection settings, logging, and fail-safe mechanisms. This gives you more control over how the gateway operates in different environments.

  • Failsafe Mechanisms

    To ensure uninterrupted traffic flow during system failures, the Failsafe Mechanism reroutes traffic directly to API providers, preventing downtime.

    This configuration is essential in maintaining high availability, ensuring your system continues to function smoothly even if the Lunar Gateway or Interceptor experiences issues.