Skip to main content

Ahnlich in Production

Ahnlich is production-ready and designed for deployment at scale. This section covers everything you need to run Ahnlich in production environments.

What You'll Learn​

  • Deployment - Docker-based deployment strategies for cloud and on-premise
  • Tracing - Distributed tracing setup for observability

Architecture Overview​

A typical production setup consists of:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Clients β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Ahnlich AI │───────>β”‚ Ahnlich DB β”‚
β”‚ (Port 1370)β”‚ β”‚ (Port 1369) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Ahnlich DB handles vector storage and similarity search
  • Ahnlich AI transforms inputs (text/images) into embeddings
  • Both services communicate over gRPC

Key Features for Production​

Persistence​

Both services support disk persistence to survive restarts:

  • Configurable intervals for snapshots
  • Automatic recovery on startup

Performance​

  • In-memory operations for low latency
  • Batch processing support
  • Configurable model batch sizes

Observability​

  • Distributed tracing with OpenTelemetry
  • Integration with Jaeger and other collectors
  • Request/response logging

Scalability​

  • Horizontal scaling via multiple instances
  • Load balancing support
  • Model caching to reduce startup time

Quick Start​

Get started with Docker Compose:

curl -O https://raw.githubusercontent.com/deven96/ahnlich/main/docker-compose.yml
docker-compose up -d

This starts both services with persistence enabled.

Next Steps​

  1. Deploy to Production - Choose your deployment platform
  2. Enable Tracing - Set up observability
  3. Review the CLI reference for configuration options