Setting up Upstash Redis¶
Upstash provides Serverless Redis with per-request pricing, which is ideal for the caching and queueing needs of Atlas ERP.
Setup Steps¶
- Create an Account: Sign up at Upstash.com.
- Create a Database:
- Name:
atlas-redis - Type: Redis
- Region: Choose a region matching your API deployment (e.g., AWS US-East-1).
- Eviction: For BullMQ to work correctly, do NOT use
allkeys-lru. Set eviction tonoevictionor ensure you have enough memory. - Get Connection Details:
- Scroll down to the Node.js (ioredis) connection example.
- Extract the Host, Port, and Password.
Configuring Atlas¶
Update your backend environment variables (apps/api/.env or in Render):
| Bash | |
|---|---|
Note on TLS/SSL¶
Upstash requires a secure connection. Our RedisService implementation should handle rediss:// protocols or TLS configurations automatically when the port is provided, but verify your ioredis configuration if you encounter connection drops.