# 分布式应用

> For AI agents: the complete glossary index is at [llms.txt](https://glossary.cncf.io/zh-cn/llms.txt).
> Markdown versions of every glossary page are available by appending `index.md` to the page URL.

## 是什么

分布式应用是一种应用，其功能被分解成多个较小的独立部分。
分布式应用通常由单独的 [微服务](https://glossary.cncf.io/zh-cn/microservices/) 组成，处理更广泛应用中的不同问题。
在云原生环境中，各个组件通常作为 [容器](https://glossary.cncf.io/zh-cn/container/) 在 [集群](https://glossary.cncf.io/zh-cn/cluster/) 上运行。

## 解决的问题 

运行在单一计算机上的应用程序代表了一个单点故障--如果该计算机发生故障，应用程序就不可用。
分布式应用通常与单体式应用形成对比。一个单体应用可能更难扩展，因为各种组件不能独立扩展。
随着应用程序的增长，它们也会拖累开发人员的速度，因为更多的开发人员需要在一个不一定有明确边界的共享代码库上工作。

## 如何帮助

当把一个应用程序拆分成不同的部分并在许多地方运行时，整个系统可以容忍更多的故障。
它还允许应用程序利用单个应用程序实例所不具备的伸缩功能，即 [水平伸缩](https://glossary.cncf.io/zh-cn/horizontal-scaling/)的能力。
然而，这也是有代价的：增加了复杂性和操作开销--你现在正在运行很多应用组件，而不是一个应用。

---

- Canonical URL: https://glossary.cncf.io/zh-cn/distributed-apps/
- Status: Completed
- 最后编辑 July 22, 2022: ` add tags ` ([2f7798e](https://github.com/cncf/glossary/commit/2f7798e5bed8513ccc6f41b217c37fd2b8f6f724))
- Source: https://github.com/cncf/glossary/blob/main/content/zh-cn/distributed-apps.md
- License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
