diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 2f2cad2e1..000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-* text=auto
-*.js linguist-language=java
-*.css linguist-language=java
-*.html linguist-language=java
\ No newline at end of file
diff --git a/.github/workflows/compress.yml b/.github/workflows/compress.yml
new file mode 100644
index 000000000..6c263c375
--- /dev/null
+++ b/.github/workflows/compress.yml
@@ -0,0 +1,36 @@
+name: Compress
+
+on:
+ schedule:
+ - cron: "0 0 * * 3"
+ workflow_dispatch:
+
+jobs:
+ compress:
+ runs-on: ubuntu-latest
+ if: github.repository == 'doocs/advanced-java'
+ steps:
+ - name: Checkout Branch
+ uses: actions/checkout@v7
+
+ - name: Compress Images
+ id: calibre
+ uses: calibreapp/image-actions@1.5.0
+ with:
+ githubToken: ${{ secrets.GITHUB_TOKEN }}
+ compressOnly: true
+
+ - name: Commit Files
+ if: |
+ steps.calibre.outputs.markdown != ''
+ run: |
+ git config --local user.email "szuyanglb@outlook.com"
+ git config --local user.name "yanglbme"
+ git commit -m "chore: auto compress images" -a
+
+ - name: Push Changes
+ if: |
+ steps.calibre.outputs.markdown != ''
+ uses: ad-m/github-push-action@v1.3.0
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 000000000..91593dd83
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,51 @@
+name: Build and deploy
+
+on:
+ push:
+ branches: [main]
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ fetch-depth: 0
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v6
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: 22
+ cache: pnpm
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Build with VitePress
+ run: pnpm run docs:build
+
+ - name: Generate CNAME
+ run: echo "java.doocs.org" > docs/.vitepress/dist/CNAME
+
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v5
+ with:
+ path: docs/.vitepress/dist
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+ permissions:
+ pages: write
+ id-token: write
+ environment:
+ name: github_pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v5
diff --git a/.github/workflows/starcharts.yml b/.github/workflows/starcharts.yml
new file mode 100644
index 000000000..83d69772e
--- /dev/null
+++ b/.github/workflows/starcharts.yml
@@ -0,0 +1,18 @@
+name: Starcharts
+
+on:
+ schedule:
+ - cron: "0 0/12 * * *"
+ workflow_dispatch:
+
+jobs:
+ update-readme:
+ name: Generate starcharts
+ runs-on: ubuntu-latest
+ steps:
+ - uses: MaoLongLong/actions-starcharts@main
+ with:
+ github_token: ${{ secrets.ACTION_TOKEN }}
+ svg_path: images/starcharts.svg
+ commit_message: "chore: auto update starcharts"
+ stars_change: ${{ secrets.STARS_CHANGE }}
diff --git a/.gitignore b/.gitignore
index f84afc615..58b09838b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,35 +1,46 @@
-/gradle/wrapper/gradle-wrapper.properties
-##----------Android----------
-# build
-*.apk
-*.ap_
-*.dex
-*.class
-bin/
-gen/
-build/
-
-# gradle
-.gradle/
-gradle-app.setting
-!gradle-wrapper.jar
-build/
-
-local.properties
-
-##----------idea----------
-*.iml
-.idea/
-*.ipr
-*.iws
-
-# Android Studio Navigation editor temp files
-.navigation/
-
-##----------Other----------
-# osx
-*~
+
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
.DS_Store
-gradle.properties
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+.vscode
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+dist
+lib
+
+node_modules
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
-.vscode
\ No newline at end of file
+docs/.vitepress/dist
+docs/.vitepress/cache
\ No newline at end of file
diff --git a/.nojekyll b/.nojekyll
deleted file mode 100644
index e69de29bb..000000000
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 000000000..bf2e7648b
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+shamefully-hoist=true
diff --git a/Main.java b/Main.java
new file mode 100644
index 000000000..2a610bf99
--- /dev/null
+++ b/Main.java
@@ -0,0 +1,8 @@
+/**
+ * @author yanglbme
+ */
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("互联网 Java 工程师进阶知识完全扫盲");
+ }
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index b0875a3e3..99266dba3 100644
--- a/README.md
+++ b/README.md
@@ -1,124 +1,215 @@
-# 互联网 Java 工程师[进阶](https://doocs.gitee.io/advanced-java/#/advanced)知识完全扫盲
-[](https://github.com/doocs/advanced-java/blob/master/LICENSE)
-[](https://github.com/doocs/advanced-java)
-[](/docs/from-readers/rights-defending-movement.md)
-[](https://github.com/doocs/intro)
-[](https://github.com/doocs/technical-books)
-[](https://github.com/doocs/leetcode)
-[](https://github.com/doocs/advanced-java/blob/master/docs/from-readers/README.md)
-[](https://github.com/doocs/advanced-java/stargazers)
-[](https://github.com/doocs/advanced-java/network/members)
-[](https://github.com/doocs/advanced-java/tree/master/docs/from-readers#contributors)
-[](https://github.com/doocs/advanced-java/labels/help%20wanted)
-[](https://github.com/doocs/advanced-java/issues)
-[](http://makeapullrequest.com)
-
-本项目大部分内容来自中华石杉,版权归作者所有,内容涵盖[高并发](#高并发架构)、[分布式](#分布式系统)、[高可用](#高可用架构)、[微服务](#微服务架构)等领域知识。我对这部分知识做了一个系统的整理,方便学习查阅。配合《[大型网站技术架构](https://github.com/doocs/technical-books#architecture)——李智慧》、《[Redis 设计与实现](https://github.com/doocs/technical-books#database)——[黄健宏](https://github.com/huangz1990)》食用,[效果更佳](https://doocs.gitee.io/advanced-java/#/offer)。
-
-学习之前,先来看看 [Issues 讨论区](https://github.com/doocs/advanced-java/issues/9#issue-394275038)的技术面试官是怎么说的吧。本项目也欢迎各位开发者朋友来[分享自己的一些想法和实践经验](/docs/from-readers/README.md)。
+# 互联网 Java 工程师进阶知识完全扫盲
+
+[](https://github.com/doocs/advanced-java/stargazers)
+[](https://github.com/doocs/advanced-java/network/members)
+[](./LICENSE)
+[](https://doocs.github.io/#/?id=how-to-join)
+
+本项目大部分内容来自中华石杉,版权归作者所有,内容涵盖[高并发](#高并发架构)、[分布式](#分布式系统)、[高可用](#高可用架构)、[微服务](#微服务架构)、[海量数据处理](#海量数据处理)等领域知识。我们对这部分知识做了一个系统的整理,方便读者们学习查阅。
+
+我们也在全力更新算法项目!如果你在准备笔面试算法,或者想进一步提升 coding 能力,欢迎 Star 关注 [doocs/leetcode](https://github.com/doocs/leetcode)
+
+学习本项目之前,先来看看 [Discussions 讨论区](https://github.com/doocs/advanced-java/discussions/9)的技术面试官是怎么说的吧。本项目欢迎各位开发者朋友到 Discussions 讨论区分享自己的一些想法和实践经验。也不妨 Star 关注 [doocs/advanced-java](https://github.com/doocs/advanced-java),随时追踪项目最新动态。
## 高并发架构
+
### [消息队列](/docs/high-concurrency/mq-interview.md)
-- [为什么使用消息队列?消息队列有什么优点和缺点?Kafka、ActiveMQ、RabbitMQ、RocketMQ 都有什么优点和缺点?](/docs/high-concurrency/why-mq.md)
-- [如何保证消息队列的高可用?](/docs/high-concurrency/how-to-ensure-high-availability-of-message-queues.md)
-- [如何保证消息不被重复消费?(如何保证消息消费的幂等性)](/docs/high-concurrency/how-to-ensure-that-messages-are-not-repeatedly-consumed.md)
-- [如何保证消息的可靠性传输?(如何处理消息丢失的问题)](/docs/high-concurrency/how-to-ensure-the-reliable-transmission-of-messages.md)
-- [如何保证消息的顺序性?](/docs/high-concurrency/how-to-ensure-the-order-of-messages.md)
-- [如何解决消息队列的延时以及过期失效问题?消息队列满了以后该怎么处理?有几百万消息持续积压几小时,说说怎么解决?](/docs/high-concurrency/mq-time-delay-and-expired-failure.md)
-- [如果让你写一个消息队列,该如何进行架构设计啊?说一下你的思路。](/docs/high-concurrency/mq-design.md)
+
+- [为什么使用消息队列?消息队列有什么优点和缺点?Kafka、ActiveMQ、RabbitMQ、RocketMQ 都有什么优点和缺点?](/docs/high-concurrency/why-mq.md)
+- [如何保证消息队列的高可用?](/docs/high-concurrency/how-to-ensure-high-availability-of-message-queues.md)
+- [如何保证消息不被重复消费?(如何保证消息消费的幂等性)](/docs/high-concurrency/how-to-ensure-that-messages-are-not-repeatedly-consumed.md)
+- [如何保证消息的可靠性传输?(如何处理消息丢失的问题)](/docs/high-concurrency/how-to-ensure-the-reliable-transmission-of-messages.md)
+- [如何保证消息的顺序性?](/docs/high-concurrency/how-to-ensure-the-order-of-messages.md)
+- [如何解决消息队列的延时以及过期失效问题?消息队列满了以后该怎么处理?有几百万消息持续积压几小时,说说怎么解决?](/docs/high-concurrency/mq-time-delay-and-expired-failure.md)
+- [如果让你写一个消息队列,该如何进行架构设计啊?说一下你的思路。](/docs/high-concurrency/mq-design.md)
### [搜索引擎](/docs/high-concurrency/es-introduction.md)
-- [es 的分布式架构原理能说一下么(es 是如何实现分布式的啊)?](/docs/high-concurrency/es-architecture.md)
-- [es 写入数据的工作原理是什么啊?es 查询数据的工作原理是什么啊?底层的 lucene 介绍一下呗?倒排索引了解吗?](/docs/high-concurrency/es-write-query-search.md)
-- [es 在数据量很大的情况下(数十亿级别)如何提高查询效率啊?](/docs/high-concurrency/es-optimizing-query-performance.md)
-- [es 生产集群的部署架构是什么?每个索引的数据量大概有多少?每个索引大概有多少个分片?](/docs/high-concurrency/es-production-cluster.md)
+
+- [ES 的分布式架构原理能说一下么(ES 是如何实现分布式的啊)?](/docs/high-concurrency/es-architecture.md)
+- [ES 写入数据的工作原理是什么啊?ES 查询数据的工作原理是什么啊?底层的 Lucene 介绍一下呗?倒排索引了解吗?](/docs/high-concurrency/es-write-query-search.md)
+- [ES 在数据量很大的情况下(数十亿级别)如何提高查询效率啊?](/docs/high-concurrency/es-optimizing-query-performance.md)
+- [ES 生产集群的部署架构是什么?每个索引的数据量大概有多少?每个索引大概有多少个分片?](/docs/high-concurrency/es-production-cluster.md)
### 缓存
-- [在项目中缓存是如何使用的?缓存如果使用不当会造成什么后果?](/docs/high-concurrency/why-cache.md)
-- [Redis 和 Memcached 有什么区别?Redis 的线程模型是什么?为什么单线程的 Redis 比多线程的 Memcached 效率要高得多?](/docs/high-concurrency/redis-single-thread-model.md)
-- [Redis 都有哪些数据类型?分别在哪些场景下使用比较合适?](/docs/high-concurrency/redis-data-types.md)
-- [Redis 的过期策略都有哪些?手写一下 LRU 代码实现?](/docs/high-concurrency/redis-expiration-policies-and-lru.md)
-- [如何保证 Redis 高并发、高可用?Redis 的主从复制原理能介绍一下么?Redis 的哨兵原理能介绍一下么?](/docs/high-concurrency/how-to-ensure-high-concurrency-and-high-availability-of-redis.md)
-- [Redis 的持久化有哪几种方式?不同的持久化机制都有什么优缺点?持久化机制具体底层是如何实现的?](/docs/high-concurrency/redis-persistence.md)
-- [Redis 集群模式的工作原理能说一下么?在集群模式下,Redis 的 key 是如何寻址的?分布式寻址都有哪些算法?了解一致性 hash 算法吗?如何动态增加和删除一个节点?](/docs/high-concurrency/redis-cluster.md)
-- [了解什么是 redis 的雪崩、穿透和击穿?Redis 崩溃之后会怎么样?系统该如何应对这种情况?如何处理 Redis 的穿透?](/docs/high-concurrency/redis-caching-avalanche-and-caching-penetration.md)
-- [如何保证缓存与数据库的双写一致性?](/docs/high-concurrency/redis-consistence.md)
-- [Redis 的并发竞争问题是什么?如何解决这个问题?了解 Redis 事务的 CAS 方案吗?](/docs/high-concurrency/redis-cas.md)
-- [生产环境中的 Redis 是怎么部署的?](/docs/high-concurrency/redis-production-environment.md)
+
+- [在项目中缓存是如何使用的?缓存如果使用不当会造成什么后果?](/docs/high-concurrency/why-cache.md)
+- [Redis 和 Memcached 有什么区别?Redis 的线程模型是什么?为什么单线程的 Redis 比多线程的 Memcached 效率要高得多?](/docs/high-concurrency/redis-single-thread-model.md)
+- [Redis 都有哪些数据类型?分别在哪些场景下使用比较合适?](/docs/high-concurrency/redis-data-types.md)
+- [Redis 的过期策略都有哪些?手写一下 LRU 代码实现?](/docs/high-concurrency/redis-expiration-policies-and-lru.md)
+- [如何保证 Redis 高并发、高可用?Redis 的主从复制原理能介绍一下么?Redis 的哨兵原理能介绍一下么?](/docs/high-concurrency/how-to-ensure-high-concurrency-and-high-availability-of-redis.md)
+- [Redis 主从架构是怎样的?](/docs/high-concurrency/redis-master-slave.md)
+- [Redis 哨兵集群如何实现高可用?](/docs/high-concurrency/redis-sentinel.md)
+- [Redis 的持久化有哪几种方式?不同的持久化机制都有什么优缺点?持久化机制具体底层是如何实现的?](/docs/high-concurrency/redis-persistence.md)
+- [Redis 集群模式的工作原理能说一下么?在集群模式下,Redis 的 key 是如何寻址的?分布式寻址都有哪些算法?了解一致性 hash 算法吗?如何动态增加和删除一个节点?](/docs/high-concurrency/redis-cluster.md)
+- [了解什么是 Redis 的雪崩、穿透和击穿?Redis 崩溃之后会怎么样?系统该如何应对这种情况?如何处理 Redis 的穿透?](/docs/high-concurrency/redis-caching-avalanche-and-caching-penetration.md)
+- [如何保证缓存与数据库的双写一致性?](/docs/high-concurrency/redis-consistence.md)
+- [Redis 的并发竞争问题是什么?如何解决这个问题?了解 Redis 事务的 CAS 方案吗?](/docs/high-concurrency/redis-cas.md)
+- [生产环境中的 Redis 是怎么部署的?](/docs/high-concurrency/redis-production-environment.md)
+- [有了解过 Redis rehash 的过程吗?](/docs/high-concurrency/redis-rehash.md)
### 分库分表
-- [为什么要分库分表(设计高并发系统的时候,数据库层面该如何设计)?用过哪些分库分表中间件?不同的分库分表中间件都有什么优点和缺点?你们具体是如何对数据库如何进行垂直拆分或水平拆分的?](/docs/high-concurrency/database-shard.md)
-- [现在有一个未分库分表的系统,未来要分库分表,如何设计才可以让系统从未分库分表动态切换到分库分表上?](/docs/high-concurrency/database-shard-method.md)
-- [如何设计可以动态扩容缩容的分库分表方案?](/docs/high-concurrency/database-shard-dynamic-expand.md)
-- [分库分表之后,id 主键如何处理?](/docs/high-concurrency/database-shard-global-id-generate.md)
+
+- [为什么要分库分表(设计高并发系统的时候,数据库层面该如何设计)?用过哪些分库分表中间件?不同的分库分表中间件都有什么优点和缺点?你们具体是如何对数据库如何进行垂直拆分或水平拆分的?](/docs/high-concurrency/database-shard.md)
+- [现在有一个未分库分表的系统,未来要分库分表,如何设计才可以让系统从未分库分表动态切换到分库分表上?](/docs/high-concurrency/database-shard-method.md)
+- [如何设计可以动态扩容缩容的分库分表方案?](/docs/high-concurrency/database-shard-dynamic-expand.md)
+- [分库分表之后,id 主键如何处理?](/docs/high-concurrency/database-shard-global-id-generate.md)
### 读写分离
-- [如何实现 MySQL 的读写分离?MySQL 主从复制原理是啥?如何解决 MySQL 主从同步的延时问题?](/docs/high-concurrency/mysql-read-write-separation.md)
+
+- [如何实现 MySQL 的读写分离?MySQL 主从复制原理是啥?如何解决 MySQL 主从同步的延时问题?](/docs/high-concurrency/mysql-read-write-separation.md)
### 高并发系统
-- [如何设计一个高并发系统?](/docs/high-concurrency/high-concurrency-design.md)
+
+- [如何设计一个高并发系统?](/docs/high-concurrency/high-concurrency-design.md)
## 分布式系统
+
### [面试连环炮](/docs/distributed-system/distributed-system-interview.md)
+
### 系统拆分
-- [为什么要进行系统拆分?如何进行系统拆分?拆分后不用 Dubbo 可以吗?](/docs/distributed-system/why-dubbo.md)
+
+- [为什么要进行系统拆分?如何进行系统拆分?拆分后不用 Dubbo 可以吗?](/docs/distributed-system/why-dubbo.md)
### 分布式服务框架
-- [说一下 Dubbo 的工作原理?注册中心挂了可以继续通信吗?](/docs/distributed-system/dubbo-operating-principle.md)
-- [Dubbo 支持哪些序列化协议?说一下 Hessian 的数据结构?PB 知道吗?为什么 PB 的效率是最高的?](/docs/distributed-system/dubbo-serialization-protocol.md)
-- [Dubbo 负载均衡策略和集群容错策略都有哪些?动态代理策略呢?](/docs/distributed-system/dubbo-load-balancing.md)
-- [Dubbo 的 spi 思想是什么?](/docs/distributed-system/dubbo-spi.md)
-- [如何基于 Dubbo 进行服务治理、服务降级、失败重试以及超时重试?](/docs/distributed-system/dubbo-service-management.md)
-- [分布式服务接口的幂等性如何设计(比如不能重复扣款)?](/docs/distributed-system/distributed-system-idempotency.md)
-- [分布式服务接口请求的顺序性如何保证?](/docs/distributed-system/distributed-system-request-sequence.md)
-- [如何自己设计一个类似 Dubbo 的 RPC 框架?](/docs/distributed-system/dubbo-rpc-design.md)
+
+- [说一下 Dubbo 的工作原理?注册中心挂了可以继续通信吗?](/docs/distributed-system/dubbo-operating-principle.md)
+- [Dubbo 支持哪些序列化协议?说一下 Hessian 的数据结构?PB 知道吗?为什么 PB 的效率是最高的?](/docs/distributed-system/dubbo-serialization-protocol.md)
+- [Dubbo 负载均衡策略和集群容错策略都有哪些?动态代理策略呢?](/docs/distributed-system/dubbo-load-balancing.md)
+- [Dubbo 的 spi 思想是什么?](/docs/distributed-system/dubbo-spi.md)
+- [如何基于 Dubbo 进行服务治理、服务降级、失败重试以及超时重试?](/docs/distributed-system/dubbo-service-management.md)
+- [分布式服务接口的幂等性如何设计(比如不能重复扣款)?](/docs/distributed-system/distributed-system-idempotency.md)
+- [分布式服务接口请求的顺序性如何保证?](/docs/distributed-system/distributed-system-request-sequence.md)
+- [如何自己设计一个类似 Dubbo 的 RPC 框架?](/docs/distributed-system/dubbo-rpc-design.md)
+- [CAP 定理的 P 是什么?](/docs/distributed-system/distributed-system-cap.md)
### 分布式锁
-- [Zookeeper 都有哪些应用场景?](/docs/distributed-system/zookeeper-application-scenarios.md)
-- [使用 Redis 如何设计分布式锁?使用 Zookeeper 来设计分布式锁可以吗?以上两种分布式锁的实现方式哪种效率比较高?](/docs/distributed-system/distributed-lock-redis-vs-zookeeper.md)
+
+- [Zookeeper 都有哪些应用场景?](/docs/distributed-system/zookeeper-application-scenarios.md)
+- [使用 Redis 如何设计分布式锁?使用 Zookeeper 来设计分布式锁可以吗?以上两种分布式锁的实现方式哪种效率比较高?](/docs/distributed-system/distributed-lock-redis-vs-zookeeper.md)
### 分布式事务
-- [分布式事务了解吗?你们如何解决分布式事务问题的?TCC 如果出现网络连不通怎么办?XA 的一致性如何保证?](/docs/distributed-system/distributed-transaction.md)
+
+- [分布式事务了解吗?你们如何解决分布式事务问题的?TCC 如果出现网络连不通怎么办?XA 的一致性如何保证?](/docs/distributed-system/distributed-transaction.md)
### 分布式会话
-- [集群部署时的分布式 Session 如何实现?](/docs/distributed-system/distributed-session.md)
+
+- [集群部署时的分布式 Session 如何实现?](/docs/distributed-system/distributed-session.md)
## 高可用架构
-- [Hystrix 介绍](/docs/high-availability/hystrix-introduction.md)
-- [电商网站详情页系统架构](/docs/high-availability/e-commerce-website-detail-page-architecture.md)
-- [Hystrix 线程池技术实现资源隔离](/docs/high-availability/hystrix-thread-pool-isolation.md)
-- [Hystrix 信号量机制实现资源隔离](/docs/high-availability/hystrix-semphore-isolation.md)
-- [Hystrix 隔离策略细粒度控制](/docs/high-availability/hystrix-execution-isolation.md)
-- [深入 Hystrix 执行时内部原理](/docs/high-availability/hystrix-process.md)
-- [基于 request cache 请求缓存技术优化批量商品数据查询接口](/docs/high-availability/hystrix-request-cache.md)
-- [基于本地缓存的 fallback 降级机制](/docs/high-availability/hystrix-fallback.md)
-- [深入 Hystrix 断路器执行原理](/docs/high-availability/hystrix-circuit-breaker.md)
-- [深入 Hystrix 线程池隔离与接口限流](/docs/high-availability/hystrix-thread-pool-current-limiting.md)
-- [基于 timeout 机制为服务接口调用超时提供安全保护](/docs/high-availability/hystrix-timeout.md)
+
+- [Hystrix 介绍](/docs/high-availability/hystrix-introduction.md)
+- [电商网站详情页系统架构](/docs/high-availability/e-commerce-website-detail-page-architecture.md)
+- [Hystrix 线程池技术实现资源隔离](/docs/high-availability/hystrix-thread-pool-isolation.md)
+- [Hystrix 信号量机制实现资源隔离](/docs/high-availability/hystrix-semphore-isolation.md)
+- [Hystrix 隔离策略细粒度控制](/docs/high-availability/hystrix-execution-isolation.md)
+- [深入 Hystrix 执行时内部原理](/docs/high-availability/hystrix-process.md)
+- [基于 request cache 请求缓存技术优化批量商品数据查询接口](/docs/high-availability/hystrix-request-cache.md)
+- [基于本地缓存的 fallback 降级机制](/docs/high-availability/hystrix-fallback.md)
+- [深入 Hystrix 断路器执行原理](/docs/high-availability/hystrix-circuit-breaker.md)
+- [深入 Hystrix 线程池隔离与接口限流](/docs/high-availability/hystrix-thread-pool-current-limiting.md)
+- [基于 timeout 机制为服务接口调用超时提供安全保护](/docs/high-availability/hystrix-timeout.md)
### 高可用系统
-- 如何设计一个高可用系统?
+
+- 如何设计一个高可用系统?
### 限流
-- 如何限流?在工作中是怎么做的?说一下具体的实现?
+
+- [如何限流?在工作中是怎么做的?说一下具体的实现?](/docs/high-concurrency/how-to-limit-current.md)
### 熔断
-- 如何进行熔断?
-- 熔断框架都有哪些?具体实现原理知道吗?
+
+- 如何进行熔断?
+- 熔断框架都有哪些?具体实现原理知道吗?
+- [熔断框架如何做技术选型?选用 Sentinel 还是 Hystrix?](/docs/high-availability/sentinel-vs-hystrix.md)
### 降级
-- 如何进行降级?
+
+- 如何进行降级?
## 微服务架构
-- [微服务架构整个章节内容属额外新增,后续抽空更新,也欢迎读者们参与补充完善](https://github.com/doocs/advanced-java)
-- [关于微服务架构的描述](/docs/micro-services/microservices-introduction.md)
+
+- [微服务架构整个章节内容属额外新增,后续抽空更新,也欢迎读者们参与补充完善](https://github.com/doocs/advanced-java)
+- [关于微服务架构的描述](/docs/micro-services/microservices-introduction.md)
+- [从单体式架构迁移到微服务架构](/docs/micro-services/migrating-from-a-monolithic-architecture-to-a-microservices-architecture.md)
+- [微服务的事件驱动数据管理](/docs/micro-services/event-driven-data-management-for-microservices.md)
+- [选择微服务部署策略](/docs/micro-services/choose-microservice-deployment-strategy.md)
+- [微服务架构的优势与不足](/docs/micro-services/advantages-and-disadvantages-of-microservice.md)
### Spring Cloud 微服务架构
-- 什么是微服务?微服务之间是如何独立通讯的?
-- Spring Cloud 和 Dubbo 有哪些区别?
-- Spring Boot 和 Spring Cloud,谈谈你对它们的理解?
-- 什么是服务熔断?什么是服务降级?
-- 微服务的优缺点分别是什么?说一下你在项目开发中碰到的坑?
-- 你所知道的微服务技术栈都有哪些?
-- Eureka 和 Zookeeper 都可以提供服务注册与发现的功能,它们有什么区别?
-- ......
\ No newline at end of file
+
+- [什么是微服务?微服务之间是如何独立通讯的?](/docs/micro-services/what's-microservice-how-to-communicate.md)
+- Spring Cloud 和 Dubbo 有哪些区别?
+- Spring Boot 和 Spring Cloud,谈谈你对它们的理解?
+- 什么是服务熔断?什么是服务降级?
+- 微服务的优缺点分别是什么?说一下你在项目开发中碰到的坑?
+- [你所知道的微服务技术栈都有哪些?](/docs/micro-services/micro-services-technology-stack.md)
+- [微服务治理策略](/docs/micro-services/micro-service-governance.md)
+- Eureka 和 Zookeeper 都可以提供服务注册与发现的功能,它们有什么区别?
+- [谈谈服务发现组件 Eureka 的主要调用过程?](/docs/micro-services/how-eureka-enable-service-discovery-and-service-registration.md)
+- ......
+
+## 海量数据处理
+
+- [如何从大量的 URL 中找出相同的 URL?](/docs/big-data/find-common-urls.md)
+- [如何从大量数据中找出高频词?](/docs/big-data/find-top-100-words.md)
+- [如何找出某一天访问百度网站最多的 IP?](/docs/big-data/find-top-1-ip.md)
+- [如何在大量的数据中找出不重复的整数?](/docs/big-data/find-no-repeat-number.md)
+- [如何在大量的数据中判断一个数是否存在?](/docs/big-data/find-a-number-if-exists.md)
+- [如何查询最热门的查询串?](/docs/big-data/find-hotest-query-string.md)
+- [如何统计不同电话号码的个数?](/docs/big-data/count-different-phone-numbers.md)
+- [如何从 5 亿个数中找出中位数?](/docs/big-data/find-mid-value-in-500-millions.md)
+- [如何按照 query 的频度排序?](/docs/big-data/sort-the-query-strings-by-counts.md)
+- [如何找出排名前 500 的数?](/docs/big-data/find-rank-top-500-numbers.md)
+- [讲讲大数据中 TopK 问题的常用套路?](/docs/big-data/topk-problems-and-solutions.md)
+
+## Stars 趋势
+
+
+
+注:本趋势图由 [actions-starcharts](https://github.com/MaoLongLong/actions-starcharts) 自动定时刷新,作者 [@MaoLongLong](https://github.com/maolonglong)
+
+---
+
+## Doocs 社区优质项目
+
+Doocs 技术社区,致力于打造一个内容完整、持续成长的互联网开发者学习生态圈!以下是 Doocs 旗下的一些优秀项目,欢迎各位开发者朋友持续保持关注。
+
+| # | 项目 | 描述 | 热度 |
+| --- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
+| 1 | [advanced-java](https://github.com/doocs/advanced-java) | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识。 | 
 |
+| 2 | [leetcode](https://github.com/doocs/leetcode) | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解。 | 
 |
+| 3 | [source-code-hunter](https://github.com/doocs/source-code-hunter) | 互联网常用组件框架源码分析。 | 
 |
+| 4 | [jvm](https://github.com/doocs/jvm) | Java 虚拟机底层原理知识总结。 | 
 |
+| 5 | [coding-interview](https://github.com/doocs/coding-interview) | 代码面试题集,包括《剑指 Offer》、《编程之美》等。 | 
 |
+| 6 | [md](https://github.com/doocs/md) | 一款高度简洁的微信 Markdown 编辑器。 | 
 |
+| 7 | [technical-books](https://github.com/doocs/technical-books) | 值得一看的技术书籍列表。 | 
 |
+
+## 贡献者
+
+感谢以下所有朋友对 [Doocs 技术社区](https://github.com/doocs) 所做出的贡献,[参与项目维护请戳这儿](https://doocs.github.io/#/?id=how-to-join)。
+
+
+
+
+
+
+
+## 公众号
+
+[Doocs](https://github.com/doocs) 技术社区旗下唯一公众号「**Doocs**」,欢迎扫码关注,**专注分享技术领域相关知识及行业最新资讯**。当然,也可以加我个人微信(备注:GitHub),拉你进技术交流群。
+
+
+
+
+ 
+ |
+
+ 
+ |
+
+
+
+关注「**Doocs**」公众号,回复 **PDF**,即可获取本项目离线 PDF 文档(283 页精华),学习更加方便!
+
+
diff --git a/_coverpage.md b/_coverpage.md
deleted file mode 100644
index 692687046..000000000
--- a/_coverpage.md
+++ /dev/null
@@ -1,9 +0,0 @@
-[](https://github.com/doocs/advanced-java)
-
-# Java 进阶扫盲
-
-> 高并发 分布式 高可用 微服务
-
-[Doocs](https://github.com/doocs/intro)
-[GitHub](https://github.com/yanglbme)
-[Get Started](#互联网-java-工程师进阶知识完全扫盲)
\ No newline at end of file
diff --git a/_navbar.md b/_navbar.md
deleted file mode 100644
index 5287e2b39..000000000
--- a/_navbar.md
+++ /dev/null
@@ -1,14 +0,0 @@
-* 分类
- * [高并发](/README#高并发架构)
- * [分布式](/README#分布式系统)
- * [高可用](/README#高可用架构)
- * [微服务](/README#微服务架构)
- * [读者分享](/docs/from-readers/README)
-
-* 页面
- * [封面]()
- * [首页](README)
- * [进阶](advanced)
- * [Offer](offer)
- * [Doocs](https://github.com/doocs/intro)
- * [GitHub](https://github.com/yanglbme)
\ No newline at end of file
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
new file mode 100644
index 000000000..abf707ce6
--- /dev/null
+++ b/docs/.vitepress/config.mts
@@ -0,0 +1,489 @@
+import { defineConfig } from "vitepress";
+
+export default defineConfig({
+ title: "advanced-java",
+ ignoreDeadLinks: true,
+ themeConfig: {
+ search: {
+ provider: 'local'
+ },
+ footer: {
+ message: 'Released under the CC-BY-SA-4.0 license.',
+ copyright: `Copyright © 2018-${new Date().getFullYear()} Doocs`
+ },
+ logo: '/icon.png',
+ docFooter: {
+ prev: '上一篇',
+ next: '下一篇'
+ },
+ editLink: {
+ pattern: 'https://github.com/doocs/advanced-java/edit/main/docs/:path',
+ text: '在 GitHub 编辑'
+ },
+ nav: [
+ { text: "首页", link: "/" },
+ { text: "高并发架构", link: "/high-concurrency/mq-interview.md" },
+ {
+ text: "分布式系统",
+ link: "/distributed-system/distributed-system-interview.md",
+ },
+ {
+ text: "高可用架构",
+ link: "/high-availability/hystrix-introduction.md",
+ },
+ {
+ text: "微服务架构",
+ link: "/micro-services/microservices-introduction.md",
+ },
+ { text: "海量数据处理", link: "/big-data/find-common-urls.md" },
+ ],
+
+ sidebar: [
+ {
+ text: "高并发架构",
+ collapsed: true,
+ items: [
+ {
+ text: "消息队列",
+ link: "/high-concurrency/mq-interview.md",
+ collapsed: true,
+ items: [
+ {
+ text: "为什么使用消息队列?",
+ link: "/high-concurrency/why-mq.md",
+ },
+ {
+ text: "如何保证消息队列的高可用?",
+ link: "/high-concurrency/how-to-ensure-high-availability-of-message-queues.md",
+ },
+ {
+ text: "如何保证消息不被重复消费?",
+ link: "/high-concurrency/how-to-ensure-that-messages-are-not-repeatedly-consumed.md",
+ },
+ {
+ text: "如何保证消息的可靠性传输?",
+ link: "/high-concurrency/how-to-ensure-the-reliable-transmission-of-messages.md",
+ },
+ {
+ text: "如何保证消息的顺序性?",
+ link: "/high-concurrency/how-to-ensure-the-order-of-messages.md",
+ },
+ {
+ text: "如何解决消息队列的延时及过期问题?",
+ link: "/high-concurrency/mq-time-delay-and-expired-failure.md",
+ },
+ {
+ text: "如何设计一个消息队列?",
+ link: "/high-concurrency/mq-design.md",
+ },
+ ],
+ },
+ {
+ text: "搜索引擎",
+ collapsed: true,
+ link: "/high-concurrency/es-introduction.md",
+ items: [
+ {
+ text: "ES 的分布式架构原理",
+ link: "/high-concurrency/es-architecture.md",
+ },
+ {
+ text: "ES 写入数据原理",
+ link: "/high-concurrency/es-write-query-search.md",
+ },
+ {
+ text: "ES 查询性能优化",
+ link: "/high-concurrency/es-optimizing-query-performance.md",
+ },
+ {
+ text: "ES 生产集群架构",
+ link: "/high-concurrency/es-production-cluster.md",
+ },
+ ],
+ },
+ {
+ text: "缓存",
+ collapsed: true,
+ items: [
+ {
+ text: "缓存的使用方式",
+ link: "/high-concurrency/why-cache.md",
+ },
+ {
+ text: "Redis 和 Memcached 区别",
+ link: "/high-concurrency/redis-single-thread-model.md",
+ },
+ {
+ text: "Redis 数据类型和场景",
+ link: "/high-concurrency/redis-data-types.md",
+ },
+ {
+ text: "Redis 过期策略",
+ link: "/high-concurrency/redis-expiration-policies-and-lru.md",
+ },
+ {
+ text: "Redis 高并发与高可用",
+ link: "/high-concurrency/how-to-ensure-high-concurrency-and-high-availability-of-redis.md",
+ },
+ {
+ text: "Redis 主从架构",
+ link: "/high-concurrency/redis-master-slave.md",
+ },
+ {
+ text: "Redis 持久化机制",
+ link: "/high-concurrency/redis-persistence.md",
+ },
+ {
+ text: "哨兵集群实现高可用",
+ link: "/high-concurrency/redis-sentinel.md",
+ },
+ {
+ text: "Redis 集群模式原理",
+ link: "/high-concurrency/redis-cluster.md",
+ },
+ {
+ text: "缓存雪崩穿透击穿",
+ link: "/high-concurrency/redis-caching-avalanche-and-caching-penetration.md",
+ },
+ {
+ text: "缓存与数据库一致性",
+ link: "/high-concurrency/redis-consistence.md",
+ },
+ {
+ text: "Redis 并发竞争问题",
+ link: "/high-concurrency/redis-cas.md",
+ },
+ {
+ text: "Redis 生产部署方案",
+ link: "/high-concurrency/redis-production-environment.md",
+ },
+ ],
+ },
+ {
+ text: "分库分表",
+ collapsed: true,
+ items: [
+ {
+ text: "为什么要分库分表?",
+ link: "/high-concurrency/database-shard.md",
+ },
+ {
+ text: "分库分表如何平滑过渡?",
+ link: "/high-concurrency/database-shard-method.md",
+ },
+ {
+ text: "动态扩缩容方案",
+ link: "/high-concurrency/database-shard-dynamic-expand.md",
+ },
+ {
+ text: "主键 ID 如何处理?",
+ link: "/high-concurrency/database-shard-global-id-generate.md",
+ },
+ ],
+ },
+ {
+ text: "读写分离",
+ items: [
+ {
+ text: "如何实现读写分离?",
+ link: "/high-concurrency/mysql-read-write-separation.md",
+ },
+ ],
+ },
+ {
+ text: "高并发系统",
+ items: [
+ {
+ text: "如何设计一个高并发系统?",
+ link: "/high-concurrency/high-concurrency-design.md",
+ },
+ ],
+ },
+ {
+ text: "限流",
+ items: [
+ {
+ text: "限流实现方式",
+ link: "/high-concurrency/how-to-limit-current.md",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ text: "分布式系统",
+ collapsed: true,
+ items: [
+ {
+ text: "面试连环炮",
+ link: "/distributed-system/distributed-system-interview.md",
+ },
+ {
+ text: "系统拆分",
+ items: [
+ {
+ text: "为什么要拆分系统?",
+ link: "/distributed-system/why-dubbo.md",
+ },
+ ],
+ },
+ {
+ text: "分布式服务框架",
+ collapsed: true,
+ items: [
+ {
+ text: "Dubbo 工作原理",
+ link: "/distributed-system/dubbo-operating-principle.md",
+ },
+ {
+ text: "Dubbo 序列化协议",
+ link: "/distributed-system/dubbo-serialization-protocol.md",
+ },
+ {
+ text: "Dubbo 负载与容错策略",
+ link: "/distributed-system/dubbo-load-balancing.md",
+ },
+ {
+ text: "Dubbo 的 SPI 思想",
+ link: "/distributed-system/dubbo-spi.md",
+ },
+ {
+ text: "服务治理方案",
+ link: "/distributed-system/dubbo-service-management.md",
+ },
+ {
+ text: "接口幂等性设计",
+ link: "/distributed-system/distributed-system-idempotency.md",
+ },
+ {
+ text: "接口顺序性设计",
+ link: "/distributed-system/distributed-system-request-sequence.md",
+ },
+ {
+ text: "设计 Dubbo 类似的 RPC 框架",
+ link: "/distributed-system/dubbo-rpc-design.md",
+ },
+ {
+ text: "CAP 定理中的 P 是什么?",
+ link: "/distributed-system/distributed-system-cap.md",
+ },
+ ],
+ },
+ {
+ text: "分布式锁",
+ collapsed: true,
+ items: [
+ {
+ text: "Zookeeper 应用场景",
+ link: "/distributed-system/zookeeper-application-scenarios.md",
+ },
+ {
+ text: "Redis vs Zookeeper 实现分布式锁",
+ link: "/distributed-system/distributed-lock-redis-vs-zookeeper.md",
+ },
+ ],
+ },
+ {
+ text: "分布式事务",
+ items: [
+ {
+ text: "分布式事务原理",
+ link: "/distributed-system/distributed-transaction.md",
+ },
+ ],
+ },
+ {
+ text: "分布式会话",
+ items: [
+ {
+ text: "如何实现分布式 Session?",
+ link: "/distributed-system/distributed-session.md",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ text: "高可用架构",
+ collapsed: true,
+ items: [
+ {
+ text: "Hystrix 高可用",
+ collapsed: true,
+ items: [
+ {
+ text: "Hystrix 介绍",
+ link: "/high-availability/hystrix-introduction.md",
+ },
+ {
+ text: "详情页架构设计",
+ link: "/high-availability/e-commerce-website-detail-page-architecture.md",
+ },
+ {
+ text: "线程池隔离",
+ link: "/high-availability/hystrix-thread-pool-isolation.md",
+ },
+ {
+ text: "信号量隔离",
+ link: "/high-availability/hystrix-semphore-isolation.md",
+ },
+ {
+ text: "细粒度隔离策略",
+ link: "/high-availability/hystrix-execution-isolation.md",
+ },
+ {
+ text: "执行原理",
+ link: "/high-availability/hystrix-process.md",
+ },
+ {
+ text: "Request Cache 缓存",
+ link: "/high-availability/hystrix-request-cache.md",
+ },
+ {
+ text: "本地降级缓存",
+ link: "/high-availability/hystrix-fallback.md",
+ },
+ {
+ text: "断路器原理",
+ link: "/high-availability/hystrix-circuit-breaker.md",
+ },
+ {
+ text: "限流与线程池隔离",
+ link: "/high-availability/hystrix-thread-pool-current-limiting.md",
+ },
+ {
+ text: "Timeout 保护机制",
+ link: "/high-availability/hystrix-timeout.md",
+ },
+ ],
+ },
+ {
+ text: "熔断与降级",
+ items: [
+ {
+ text: "Sentinel vs Hystrix",
+ link: "/high-availability/sentinel-vs-hystrix.md",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ text: "微服务架构",
+ collapsed: true,
+ items: [
+ {
+ text: "微服务概念",
+ collapsed: true,
+ items: [
+ {
+ text: "微服务架构描述",
+ link: "/micro-services/microservices-introduction.md",
+ },
+ {
+ text: "从单体到微服务",
+ link: "/micro-services/migrating-from-a-monolithic-architecture-to-a-microservices-architecture.md",
+ },
+ {
+ text: "事件驱动数据管理",
+ link: "/micro-services/event-driven-data-management-for-microservices.md",
+ },
+ {
+ text: "选择部署策略",
+ link: "/micro-services/choose-microservice-deployment-strategy.md",
+ },
+ ],
+ },
+ {
+ text: "Spring Cloud 架构",
+ collapsed: true,
+ items: [
+ {
+ text: "微服务间通信机制",
+ link: "/micro-services/what's-microservice-how-to-communicate.md",
+ },
+ {
+ text: "微服务技术栈",
+ link: "/micro-services/micro-services-technology-stack.md",
+ },
+ {
+ text: "微服务治理策略",
+ link: "/micro-services/micro-service-governance.md",
+ },
+ {
+ text: "Eureka 服务注册发现",
+ link: "/micro-services/how-eureka-enable-service-discovery-and-service-registration.md",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ text: "海量数据处理",
+ collapsed: true,
+ items: [
+ { text: "查找相同 URL", link: "/big-data/find-common-urls.md" },
+ { text: "查找高频词", link: "/big-data/find-top-100-words.md" },
+ { text: "找出最多访问 IP", link: "/big-data/find-top-1-ip.md" },
+ {
+ text: "找出不重复整数",
+ link: "/big-data/find-no-repeat-number.md",
+ },
+ {
+ text: "判断数是否存在",
+ link: "/big-data/find-a-number-if-exists.md",
+ },
+ {
+ text: "查询最热门查询串",
+ link: "/big-data/find-hotest-query-string.md",
+ },
+ {
+ text: "统计不同手机号",
+ link: "/big-data/count-different-phone-numbers.md",
+ },
+ {
+ text: "找出中位数",
+ link: "/big-data/find-mid-value-in-500-millions.md",
+ },
+ {
+ text: "根据频率排序查询串",
+ link: "/big-data/sort-the-query-strings-by-counts.md",
+ },
+ {
+ text: "找出前 500 个数",
+ link: "/big-data/find-rank-top-500-numbers.md",
+ },
+ ],
+ },
+ ],
+
+ socialLinks: [
+ { icon: "github", link: "https://github.com/doocs/advanced-java" },
+ ],
+ },
+ head: [
+ ['link', { rel: 'icon', type: 'image/png', href: '/favicon-32x32.png' }],
+ [
+ 'script',
+ { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-GWYHFTEDNE' }
+ ],
+ [
+ 'script',
+ {},
+ `window.dataLayer = window.dataLayer || [];
+ function gtag(){dataLayer.push(arguments);}
+ gtag('js', new Date());
+ gtag('config', 'G-GWYHFTEDNE');`
+ ]
+ ],
+ cleanUrls: true,
+ sitemap: {
+ hostname: 'https://java.doocs.org'
+ },
+ vite: {
+ build: {
+ // Local search index (~860 kB) is lazy-loaded; size is expected for this doc set.
+ chunkSizeWarningLimit: 1000,
+ },
+ },
+});
diff --git a/docs/.vitepress/env.d.ts b/docs/.vitepress/env.d.ts
new file mode 100644
index 000000000..560ad0cca
--- /dev/null
+++ b/docs/.vitepress/env.d.ts
@@ -0,0 +1,7 @@
+///
+
+declare module "*.vue" {
+ import type { DefineComponent } from "vue";
+ const component: DefineComponent