# 《从零开始学架构》

### 架构设计

架构设计的关键思维是判断和取舍，程序设计的关键思维是逻辑和实现

架构设计的主要目的是为了解决**复杂度**带来的问题

### 复杂度的来源

1. 高性能
2. 高可用
3. 高扩展性
4. 低成本
5. 安全
6. 规模
7. 团队协作

### 架构设计三原则

1. 合适原则：合适优于业界领先
2. 简单原则：简单优于复杂
3. 演化原则：演化优于一步到位&#x20;

### 扩展性的解决方法：拆

常见的拆分方式：

1. 面向流程拆分：分层架构
2. 面向服务拆分：SOA、微服务
3. 面向功能拆分：微内核架构

分层架构之所以可以较好的支撑系统扩展，本质在于：隔离关注点

分层架构最核心的一点就是需要保证各层之间的差异足够清晰，边界足够明显


---

# 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://zhaokaiqiang.gitbook.io/pm/du-shu-bi-ji/cong-ling-kai-shi-xue-jia-gou-1.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.
