> For the complete documentation index, see [llms.txt](https://yushuai-w.gitbook.io/consul/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yushuai-w.gitbook.io/consul/start/qi-dong-shu-ju-zhong-xin.md).

# 启用数据中心

PS：前面有些文章， 为了方便大家理解， 我把Consul的两种模式，直接使用了原文中的Server 和 Client，没有进行翻译，对于没有基础的同学，有些同学更加迷惑了。 所以，本节我就直接翻译客户端和服务器模式。&#x20;

一个代理可以在**客户端**或**服务器模式**下运行。服务器节点负责运行共识协议和存储集群状态。客户端节点大多是无状态的，严重依赖服务器节点。

在Consul集群开始服务请求之前，必须选出一个服务器节点作为领导者。Bootstrapping是将这些初始服务器节点加入集群的过程。阅读架构文档来了解更多关于Consul的内部结构。

建议每个数据中心拥有三到五台总服务器。我们非常不鼓励部署单台服务器，因为在故障情况下，数据丢失是不可避免的。请参考部署表了解更多细节。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://yushuai-w.gitbook.io/consul/start/qi-dong-shu-ju-zhong-xin.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.
