RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

    • Config
    • Options
    • Share data
    • Execute Rule Chain
    • Component Configuration Variables
    • Component Connection Reuse
    • Performance
      • Performance test case
    • Other
  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

目录

Performance

RuleGo does most of its work in the initialization phase. Executing the rule chain hardly has any performance loss. In addition, RuleGo uses a directed acyclic graph to represent the rule chain, and each input message only needs to be processed along the path in the graph, without matching all the rules, This greatly improves the efficiency and speed of message processing, and also saves resources and time. The routing algorithm can achieve: no matter how many nodes the rule chain has, it will not affect the node routing performance.

However, RuleGo itself has good performance, but what determines the overall performance of the rule chain is the business logic of the nodes. If your components have a lot of database queries or remote calls, the throughput will not be very high.

Performance suggestions:

  • Optimize the performance of the remote call interface service.
  • Use the built-in AOP to implement data caching after node processing, reducing node repetition.
  • Replace the built-in JSON encoding and decoding, use a higher performance JSON library.
  • Use custom components to implement higher performance components that meet the special needs of the project.
  • RuleGo can support a large number of concurrent requests on a single ordinary machine. You can also deploy multiple RuleGo instances, add a load balancer, and distribute the requests to different RuleGo instances for processing, achieving massive data processing.

# Performance test case

The following are the performance test results of the /examples/server /api/v1/msg/{chainId}/{msgType} interface.

Processing rule chain: js filter->js transform node.

Machine configuration CPU & memory: 2 cores (vCPU) & 2GiB

Bytes per request: 142 bytes

  • 300 concurrent test results

benchmark_300.png

monitor_300.png

  • 800 concurrent test results

benchmark_800.png

monitor_800.png

  • CPU and memory usage of RuleGo at startup and idle

monitor_idle.png

Edit this page on GitHub (opens new window)
Last Updated: 2025/04/02, 01:29:50
Component Connection Reuse
Other

← Component Connection Reuse Other→

Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式