原创 Spring Boot(2) 註解解析

@AliasFor @AliasFor註解用於聲明註解屬性的別名 顯性註解內別名 表示註解中的兩個屬性相互互爲別名 public @interface ContextConfiguration { @AliasF

原创 Spring Boot(1) 啓動分析

參考文檔: https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/html/appendix-executable-jar-format.html#ex

原创 Spring Boot(3)EnableAutoConfiguration和EnableFeignClients實現

通過ImportSelector和@Import實現 以下以EnableAutoConfiguration爲例說明各類Enable實現過程 ImportSelector說明 org.springframework.context.

原创 Kafka設計(4)生產者

參考文檔: http://kafka.apache.org/documentation/#design 生產者 負載均衡 生產者無需任何路由層接入直接發送數據到日誌分區leader節點上。所有的Kafka節點都可以應答服務器存

原创 Kafka設計(7)複製

參考文檔: http://kafka.apache.org/documentation/#design 複製 Kafka跨越指定配置數量服務器(可以設置這個複製因子在)複製每個主題分期的日誌。這提供了自動故障轉移功能,當集羣中

原创 Kafka設計(9)配額

參考文檔: http://kafka.apache.org/documentation/#design 配額 kafka集羣能夠限制請求的配置以控制客戶端使用的broker資源。Kafka broker爲共享配額的每個客戶端組

原创 Postgres流式備份(2)Barman安裝

參考文檔: http://docs.pgbarman.org/release/2.5/ EPEL:https://fedoraproject.org/wiki/EPEL 系統要求 Python 2.6或2.7 Python模

原创 Postgres流式備份(4)配置新數據庫備份

配置文件初始化 在/etc/barman.d新建數據庫配置文件 touch /etc/barman.d/192.168.220.133.conf 文件內容如下 [192.168.220.133] ; Human readable

原创 PostgreSQL10基礎(7)MVCC

參考書籍: 《PostgreSQL10 High Performance》 MVCC即Multi Version Concurrency Control多版本併發控制,爲提升多用戶訪問同樣的數據而設計,性能優於鎖定。被廣泛用於

原创 Postgres10高性能開發(5)高級SQL

WITH CTE公用表達式查詢 https://www.postgresql.org/docs/10/queries-with.html https://www.postgresql.org/docs/10/sql-selec

原创 Postgres10高性能開發(6)鎖及其檢查

鎖類型 參考文檔:https://www.postgresql.org/docs/10/explicit-locking.html 表級鎖 鎖名稱 引發操作 ACCESS SHARE 訪問共享鎖 SELECT任何

原创 Postgres流式備份(6)備份和恢復

備份 定時維護 定時維護,強制執行保留策略、WAL文件管理 Barman如通過rpm安裝將自動添加定時配置文件/etc/cron.d/barman,內容如下,設置每分鐘進行一次定時維護 # m h dom mon dow u

原创 PostgreSQL10基礎(6)Analyze和Vacuum

參考文檔 https://www.postgresql.org/docs/10/sql-analyze.html https://www.postgresql.org/docs/10/routine-vacuuming.htm

原创 PostgreSQL10基礎(3)配置介紹

配置文件:postgresql.conf 網絡和驗證 # - Connection Settings - #設置監聽的IP listen_addresses = '*' # what IP address(es) to lis

原创 PostgreSQL10基礎(1)Centos7配置

參考文檔:https://www.postgresql.org/docs/10/static/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT IPC配置 名稱 描述 Postgre