Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

OpenClaw Horizontal Scaling Proposal

说明与用途

OpenClaw 水平扩展方案通过引入 Redis 支持的 BullMQ 队列,将后台任务处理与主应用解耦,从而提升可扩展性、可靠性和可观测性。

问题

The current OpenClaw architecture tightly couples background job processing to the main application lifecycle, causing long-running tasks to block request handling, limited retry control, lack of delayed/cron job management, and difficulty scaling horizontally across multiple instances.

结果

The prototype demonstrates that decoupling job processing via Redis-backed queues improves scalability, reliability, and observability, allowing OpenClaw to handle higher job volumes and run multiple instances without performance degradation.

工作流

  • 1. Install Redis and BullMQ dependencies in the OpenClaw project.
  • 2. Refactor background task handlers to enqueue jobs into named BullMQ queues instead of executing inline.
  • 3. Create worker scripts that subscribe to the queues and process jobs independently of the HTTP/API layer.
  • 4. Configure job options for delay, repeatable (cron), priority, and retry/backoff strategies.
  • 5. Implement a dead-letter queue for permanently failed jobs and ensure idempotent job handlers.
  • 6. Add optional monitoring dashboard to visualize job states (waiting, active, completed, failed, delayed).
  • 7. Deploy additional worker instances to scale horizontally without modifying application logic.

证据

The prototype is available here: https://scalyclaw.netlify.app/

来源

The main architectural change is the introduction of Redis and BullMQ to manage background jobs, delayed jobs, and cron-based tasks in a more structured way.

来源

  • 记录日期: 2026-09-07T23:22:42.637Z