agentscope-ai/ReMe

feat: support horizontal scaling / cluster deployment for production

Open

#386 opened on Jul 22, 2026

 (1 comment) (0 reactions) (0 assignees)Python (256 forks)github user discovery
help wanted

Repository metrics

Stars
 (3,051 stars)
PR merge metrics
 (Avg merge 17h 48m) (44 merged PRs in 30d)

Description

Feature Request: Horizontal Scaling / Cluster Deployment Support

Is your feature request related to a problem?

Yes. ReMe is designed as a local-first, single-instance application. While this works great for personal/single-agent use cases, it becomes a bottleneck when deploying ReMe as a shared memory service in production environments (e.g., Kubernetes / cloud VM clusters) that require horizontal scaling.

Currently, running multiple ReMe replicas causes three critical problems:

  1. Index inconsistency: Each replica holds its own in-memory FAISS vector index and BM25 keyword index. Search results differ across replicas, and new replicas need time to rebuild indexes on startup.

  2. Duplicate background task execution: The 3 background watch jobs (index_update_loop, resource_watch_loop, digest_watch_loop) and the cron job (dream_cron) run on every replica, causing duplicate file writes and potential race conditions on the shared workspace.

  3. No built-in authentication: The HTTP service has no API key or token validation. Anyone who can reach the port can read/write/delete all workspace files and trigger LLM calls (costing API quota). Production deployment requires at least an API key middleware.

These limitations force production deployments to a single instance, preventing horizontal scaling under high load.

Describe the solution you'd like

1. External index backends (pluggable)

The component architecture is already well-designed with abstract base classes (BaseKeywordIndex, BaseEmbeddingStore, BaseFileStore) and the @R.register() registry. We'd like official backend implementations for:

Component Current (local) Requested (external)
Keyword index BM25Index (in-memory + pickle) Elasticsearch / OpenSearch backend
Vector store FaissLocalFileStore (in-memory FAISS) DashVector / Milvus / Qdrant backend
File graph LocalFileGraph / NetworkX Neo4j (already partially supported)

This way, all replicas share the same external index state, achieving consistency without each replica rebuilding its own index.

Configuration example:

components:
  keyword_index:
    default:
      backend: elasticsearch
      es_url: ${ES_URL}
      index_name: reme-keywords

  file_store:
    default:
      backend: external_vector_store
      embedding_store: default
      keyword_index: default
      file_graph: default

Contributor guide