Lunar Pro Installation
To scale Lunar.dev API Consumption Gateway, you can run multiple instances concurrently. This setup ensures that traffic is balanced across the instances, enhancing both performance and fault tolerance.
To get started:
- Obtain the Lunar Pro image:
- The
lunar-proxy-pro
image required for Lunar Pro is not publicly available. To obtain this image, you must contact Lunar.dev directly to request access. Once you receive the necessary access key from Lunar, follow the steps in the installation guide and make sure to replace the standardlunar-proxy
image with thelunar-proxy-pro
image.
- The
- Set up Redis for shared state:
- You’ll need a running Redis instance to store the shared state between Lunar Pro instances. You can quickly set this up using the
redis
image from Docker Hub. - Once the Redis instance is running, configure each Lunar Pro instance to connect to Redis by setting the
REDIS_URL
environment variable. The URL format should beredis://<host>:<port>
orrediss://<host>:<port>
if using TLS.
redisPrefixnoteThe redis will use
lunar
as its default prefix for the gateway connection with Redis, to configure the value please change:REDIS_PREFIX
when running using DockerredisPrefix
when using Helm Chart
- You’ll need a running Redis instance to store the shared state between Lunar Pro instances. You can quickly set this up using the
- mTLS for Redis:
- For enhanced security, Lunar Pro supports connecting to Redis using mutual TLS (mTLS). By using mTLS, you ensure that communication between Lunar Pro instances and Redis is encrypted and secure.
- Follow the steps in the mTLS with Redis Configuration guide to configure mTLS for your Redis connection.
Redis Connection Status
During startup, Lunar will display a message indicating the Redis connection status, including the prefix and URL used. A "Successfully initialized Redis Client"
message confirms a successful connection.
For a full breakdown of startup indicators, refer to the Lunar Logs page.