Deployment Best Practices
This guide covers everything you need to know about deploying applications that use the Nexus API in production environments. From environment configuration to monitoring and scaling.
Environment Configuration
Use separate API keys for development, staging, and production. Nexus provides environment-specific keys that isolate data between environments:
# Development
NEXUS_SECRET_KEY=sk_test_xxxxxxxx
# Production
NEXUS_SECRET_KEY=sk_live_xxxxxxxxRate Limits
Production rate limits vary by plan:
- Free: 100 requests/minute
- Pro: 1,000 requests/minute
- Enterprise: Custom limits
Implement exponential backoff for rate-limited requests. The API returns a Retry-After header with the number of seconds to wait.
Caching
Use the ETag and Last-Modified headers returned by the API to implement client-side caching. This reduces unnecessary API calls and improves your application's performance.
Monitoring
The Nexus Dashboard provides real-time metrics including request volume, error rates, latency percentiles, and webhook delivery status. Set up alerts for anomalies.