# Woker

{% hint style="success" %}

### **Worker的定义**

运行Connector实例和Task的线程，一个Worker进程代表来一个Connector Runtime 运行时环境进程，多个Worker进程组成了一个集群，支持更多的Connect 和 Task的并行运行工作。其中，Connector Runtime 还具备了**配置管理、负载均衡和任务调度。**
{% endhint %}

![Worker 进程模型](/files/-Lm54P-OAgFpXEwQCeZA)

## Worker单实例

* 若干个Connector实例以及相关联的Task任务都运行在同一个Worker实例进程上，这样子不需要调度和负载均衡，整个结构比较简单。
* 缺点也明显，消息路由的弹性扩展，消息同步的吞吐量、可容错性都比较差。

## Worker 分布式集群

![Worker 分布式集群模型](/files/-Lm9uyoXFoO23VE3Epsg)

若干个Connector实例以及相关联的Task任务会运行在不同的Worker实例进程上，这样子需要考虑好**调度和负载均衡**。在该模式中，**弹性扩展、吞吐量和可容错性**都比[Worker单实例](https://github.com/ClementIV/rocketmq-gitbook/tree/7938a09084c4abee3c6da12684cfe0314587cb0a/架构设计/woker-shi-li-mo-xing.md#worker-dan-shi-li)要提升很多。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rocketmq-1.gitbook.io/rocketmq-connector/jia-gou-she-ji/worker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
