Spring Cloud and Docker Microservice Architecture in Practice (2nd Edition) cover

Spring Cloud and Docker Microservice Architecture in Practice (2nd Edition)

Rating 3.7
Word count
150K words
Chapters
130
ISBN
9787121340154

Tags

Summary

Built on Spring Cloud Edgware RELEASE and Docker 17.09, this book aims to guide technical teams in implementing microservice architecture, covering three major themes: microservice theory, the microservice development framework (Spring Cloud), and the runtime platform (Docker). The book is divided into three parts: Part 1 provides a systematic introduction to microservice architecture; Part 2 uses the Spring Cloud development framework to build a "movie ticketing system"; Part 3 explains how to run microservice applications on Docker. The entire book is driven by carefully designed demos, guiding readers through coherent scenarios and real code examples to learn how to implement architecture design with powerful microservice technologies. As the second edition, this book adds a large number of technical features, tips, and use cases unique to the new framework versions, helping readers avoid the difficulties and pitfalls that may arise during upgrades.

This book is suitable for Java engineers, architects, operations personnel, and technology enthusiasts.

Editor's review

Spring Cloud and Docker Microservice Architecture in Action (2nd Edition) by Zhou Li is a work in the domestic microservices field that combines practical depth with timeliness. This book is not merely a technical manual but a systematic summary by the author, based on extensive enterprise-level project practice, of deeply integrating the Spring Cloud ecosystem with Docker containerization technology. Compared with the first edition, the greatest value of the second edition lies in its comprehensive update of the technology stack, closely tracking newer versions such as Spring Cloud Finchley/Greenwich at the time and covering discussions of frontier trends such as service mesh (e.g., Istio), which helps the book avoid the risk of being "outdated" as a technology selection reference.

In terms of content structure, the book follows a clear path of "theory–practice–evolution." The first half solidly builds a knowledge system of core microservice concepts (service discovery, configuration center, circuit breaking and rate limiting, etc.) and provides detailed implementations combined with Spring Cloud components; the second half focuses on breaking through the real difficulties in microservice practice: how to use Docker for efficient deployment, how to build delivery pipelines through continuous integration, and how to perform system monitoring and governance. This arrangement is especially suitable for teams needing to transform from monolithic architecture to microservices, providing an actionable "roadmap."

As a frontline architect, Zhou Li writes pragmatically, with code examples closely tied to common production scenarios and avoiding the shallowness of "toy projects." The book's solutions to complex issues such as distributed transactions, link tracing, and security authorization reflect deep engineering experience. Particularly noteworthy is the book's reflection that "microservice architecture is not a silver bullet," as well as its discussion of architecture evolution costs and team capabilities, demonstrating rational thinking behind technical decisions—a higher value beyond the use of specific tools.

Overall, this is a "tough challenges" guide for intermediate and advanced Java developers and architects. It is not content with teaching you how to use tools but strives to help you understand how, in the cloud-native context, to use these tools to build robust, maintainable, and scalable distributed systems. Although technology iterates rapidly today, the architectural thinking and problem-solving patterns contained in the book still have lasting reference value.

Who it's for

A good fit for

  • Intermediate and advanced developers with Java and Spring Boot foundations who wish to systematically learn Spring Cloud microservice development
  • Technical leads or architects responsible for or involved in migrating traditional monolithic applications to microservice architecture
  • Operations or development engineers needing to implement Docker containerized deployment and continuous integration pipelines
  • Learners with strong interest in distributed system design principles who wish to deepen understanding through practical projects

Not a good fit for

  • Pure programming beginners without any Java or Spring foundation
  • Readers who only wish to quickly understand microservice concepts and have no intention of in-depth coding and practice

Reading tips

  1. It is recommended to read in chapter order and hands-on complete all sample projects; practice is the best way to understand distributed complexity.
  2. When reading, focus on Chapters 4, 5, 9, and 10, which cover core practical content such as service governance, fault tolerance, deployment, and monitoring.
  3. Read alongside official documentation; technology updates quickly, so this book can serve as the main thread, and the latest detailed changes can be found in the current official Spring Cloud and Docker documentation.

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. 版权信息
  2. 内容简介
  3. 序1
  4. 序2
  5. 序3
  6. 序4
  7. 前言
  8. 1 微服务架构概述
  9. 1.1 单体应用架构存在的问题
  10. 1.2 如何解决单体应用架构存在的问题
  11. 1.3 什么是微服务
  12. 1.4 微服务架构的优点与挑战
  13. 1.5 微服务设计原则
  14. 1.6 如何实现微服务架构
  15. 2 微服务开发框架——Spring Cloud
  16. 2.1 Spring Cloud简介
  17. 2.2 Spring Cloud特点
  18. 2.3 Spring Cloud版本
  19. 3 开始使用Spring Cloud实战微服务
  20. 3.1 Spring Cloud实战前提
  21. 3.2 服务提供者与服务消费者
  22. 3.3 编写服务提供者
  23. 3.4 编写服务消费者
  24. 3.5 为项目整合Spring BootActuator
  25. 3.6 硬编码有哪些问题
  26. 4 微服务注册与发现
  27. 4.1 服务发现简介
  28. 4.2 Eureka简介
  29. 4.3 Eureka原理
  30. 4.4 编写Eureka Server
  31. 4.5 将微服务注册到Eureka Server上
  32. 4.6 Eureka Server的高可用
  33. 4.7 用户认证
  34. 4.8 Eureka的元数据
  35. 4.9 Eureka Server的REST端点
  36. 4.10 Eureka的自我保护模式
  37. 4.11 多网卡环境下的IP选择
  38. 4.12 Eureka的健康检查
  39. 4.13 排除Jersey依赖
  40. 5 使用Ribbon实现客户端侧负载均衡
  41. 5.1 Ribbon简介
  42. 5.2 为服务消费者整合Ribbon
  43. 5.3 Ribbon配置自定义
  44. 5.4 脱离Eureka使用Ribbon
  45. 5.5 饥饿加载
  46. 6 使用Feign实现声明式REST调用
  47. 6.1 Feign简介
  48. 6.2 为服务消费者整合Feign
  49. 6.3 自定义Feign配置
  50. 6.4 手动创建Feign
  51. 6.5 Feign对继承的支持
  52. 6.6 Feign对压缩的支持
  53. 6.7 Feign的日志
  54. 6.8 使用Feign构造多参数请求
  55. 6.9 使用Feign上传文件
  56. 7 使用Hystrix实现微服务的容错处理
  57. 7.1 实现容错的手段
  58. 7.2 使用Hystrix实现容错
  59. 7.3 Hystrix的监控
  60. 7.4 使用Hystrix Dashboard可视化监控数据
  61. 7.5 使用Turbine聚合监控数据
  62. 8 使用Zuul构建微服务网关
  63. 8.1 为什么要使用微服务网关
  64. 8.2 Zuul简介
  65. 8.3 编写Zuul微服务网关
  66. 8.4 管理端点
  67. 8.5 路由配置详解
  68. 8.6 Zuul的安全与Header
  69. 8.7 使用Zuul上传文件
  70. 8.8 Zuul的过滤器
  71. 8.9 Zuul的容错与回退
  72. 8.10 饥饿加载
  73. 8.11 Query String编码
  74. 8.12 Hystrix隔离策略与线程池
  75. 8.13 Zuul的高可用
  76. 8.14 使用Sidecar整合非JVM微服务
  77. 8.15 使用Zuul聚合微服务
  78. 9 使用Spring Cloud Config统一管理微服务配置
  79. 9.1 为什么要统一管理微服务配置
  80. 9.2 Spring Cloud Config简介
  81. 9.3 编写Config Server
  82. 9.4 编写Config Client
  83. 9.5 Config Server的Git仓库配置详解
  84. 9.6 Config Server的健康状况指示器
  85. 9.7 配置内容的加解密
  86. 9.8 使用/refresh端点手动刷新配置
  87. 9.9 使用Spring Cloud Bus自动刷新配置
  88. 9.10 Spring Cloud Config与Eureka配合使用
  89. 9.11 Spring Cloud Config的用户认证
  90. 9.12 Config Server的高可用
  91. 10 使用Spring Cloud Sleuth实现微服务跟踪
  92. 10.1 为什么要实现微服务跟踪
  93. 10.2 Spring Cloud Sleuth简介
  94. 10.3 整合Spring Cloud Sleuth
  95. 10.4 Spring Cloud Sleuth与ELK配合使用
  96. 10.5 Spring Cloud Sleuth与Zipkin配合使用
  97. 11 Spring Cloud常见问题与总结
  98. 11.1 Eureka常见问题
  99. 11.2 整合Hystrix后首次请求失败
  100. 11.3 Turbine聚合的数据不完整
  101. 11.4 Spring Cloud各组件超时
  102. 11.5 Spring Cloud各组件重试
  103. 11.6 Spring Cloud各组件调优
  104. 11.7 Spring Cloud各组件配置属性
  105. 11.8 Spring Cloud定位问题思路总结
  106. 12 Docker入门
  107. 12.1 Docker简介
  108. 12.2 版本与迭代计划
  109. 12.3 Docker的架构
  110. 12.4 安装Docker
  111. 12.5 配置镜像加速器
  112. 12.6 Docker常用命令
  113. 13 将微服务运行在Docker上
  114. 13.1 使用Dockerfile构建Docker镜像
  115. 13.2 使用Docker Registry管理Docker镜像
  116. 13.3 使用Maven插件构建Docker镜像
  117. 13.4 常见问题与总结
  118. 14 使用Docker Compose编排微服务
  119. 14.1 Docker Com pose简介
  120. 14.2 安装Docker Com pose
  121. 14.3 Docker Com pose快速入门
  122. 14.4 docker-com pose.yml常用命令
  123. 14.5 docker-com pose常用命令
  124. 14.6 Docker Com pose网络设置
  125. 14.7 综合实战:使用Docker Comose编排Spring Cloud微服务
  126. 14.8 常见问题与总结
  127. 后记
  128. 附录A:本书配套代码
  129. 附录B:Spring Cloud YES——快速开发脚手架
  130. 附录C:使用Docker快速安装本书中的组件

FAQ

What prior knowledge does this book require?
Readers need a solid Java programming foundation and familiarity with the basic use of Spring Framework and Spring Boot. Basic Linux operation and network knowledge will help with learning the Docker part.
What are the main differences between the second edition and the first edition?
The second edition mainly provides a comprehensive upgrade of the technology stack, with core content based on Spring Cloud Finchley/Greenwich and Spring Boot 2.x. It adds introductions to some Spring Cloud Alibaba components, Consul, and new tools and concepts such as service mesh (e.g., Istio), making the content closer to the technological trends of the time.
Are the code examples in the book complete and directly runnable?
The author provides complete accompanying sample code. These examples revolve around a simulated e-commerce project with a clear structure, designed to demonstrate core concepts and integration methods. Readers need to configure them appropriately for their local environment (such as JDK version, IDE, and Docker environment) before running; they are excellent learning templates.

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

周立 Author

Zhou Li is an author whose signed works span a notably wide range of subjects. Public information about him is limited, and no clear records of his nationality, birth and death dates, or educational background are available. Four of his works are held in the collection, covering categories such as society and culture, programming and design, and politics. On one hand, he co-authored the two-volume Analysis Report on County-Level Economic Operation in Henan Province, focusing on local economies and regional development. On the other, he wrote Spring Cloud and Docker Microservice Architecture in Practice (2nd Edition), demonstrating practical experience with Java microservices and containerization. He has also contributed to research on international strategy and cooperation, as seen in the Collected Research Papers of the China-UK "Belt and Road" Strategic Cooperation Forum. Overall, his writing combines technical practice with economic and social analysis, addresses professional readers, and emphasizes documentary organization and practical application.

More by the same author

Top rated in the same category