Skip to content

Instantly share code, notes, and snippets.

@pgandla
Last active January 14, 2025 07:10
Show Gist options
  • Select an option

  • Save pgandla/97bdf996ed6de06c6c27cccacf566128 to your computer and use it in GitHub Desktop.

Select an option

Save pgandla/97bdf996ed6de06c6c27cccacf566128 to your computer and use it in GitHub Desktop.
[genAI RAG vectordb]

Qdrant deployment strategies

Kubernetes - scalability

# Basic Kubernetes deployment
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: qdrant
spec:
  serviceName: qdrant
  replicas: 3  # Start with 3 nodes
  selector:
    matchLabels:
      app: qdrant
  template:
    spec:
      containers:
      - name: qdrant
        image: qdrant/qdrant:latest
        ports:
        - containerPort: 6333  # REST API
        - containerPort: 6334  # GRPC API
        volumeMounts:
        - name: qdrant-storage
          mountPath: /qdrant/storage
        resources:
          requests:
            memory: "4Gi"
            cpu: "2"
          limits:
            memory: "8Gi"
            cpu: "4"

EC2 - Docker

# Instance setup steps
sudo yum update -y
sudo yum install -y docker
sudo service docker start

# Run Qdrant container
docker run -d \
  --name qdrant \
  -p 6333:6333 \
  -p 6334:6334 \
  -v $(pwd)/qdrant_storage:/qdrant/storage \
  qdrant/qdrant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment