Spring Cloud and Docker Microservice Architecture in Action cover

Spring Cloud and Docker Microservice Architecture in Action

No rating yet
Word count
342 words
Chapters
40
ISBN
9787121312717

Tags

Summary

This is a hands-on technical book aimed at "making microservice architecture truly land," covering three major themes: microservice theory, the microservice development framework (Spring Cloud), and the runtime platform (Docker). The book can be divided into three parts: Chapter 1 systematically introduces the origins and development of microservice architecture, including the problems of monolithic application architecture, the definition of microservices, the advantages and challenges of microservice architecture, microservice design principles, and the architecture diagrams of technology selection and common components; Chapters 2 to 11 unfold around a coherent case study of a "movie ticketing system," explaining in turn Spring Cloud's positioning and version system, service providers and consumers, implementing registration and discovery with Eureka, implementing client-side load balancing with Ribbon, implementing declarative REST calls with Feign, implementing fault tolerance and monitoring with Hystrix, building a microservice gateway with Zuul, unified configuration management with Spring Cloud Config, implementing microservice tracing with Spring Cloud Sleuth, and finally summarizing common Spring Cloud problems and troubleshooting approaches; Chapters 12 to 14 turn to the runtime platform, introducing Docker's architecture and common commands, building images with Dockerfile and Maven plugins and managing images through Docker Registry, and orchestrating a complete Spring Cloud microservice set with Docker Compose. The book adopts a demo-driven approach, using a coherent scenario and concrete code examples to string scattered technical points into a reproducible practical path, suitable for Java engineers, architects, and operations personnel who want to move microservices from concept to a runnable system.

Editor's review

很多微服务书讲了一堆概念,读完还是不知道第二天上班该改哪行代码。这本书的好处是“一根线穿到底”:它不满足于罗列 Spring Cloud 的各个子项目,而是用一套“电影售票系统”把服务提供者、注册中心、负载均衡、声明式调用、容错、网关、配置中心、链路跟踪一路串起来——每个组件都是在解决上一个环节暴露出来的真实麻烦,读者能清楚知道“为什么需要它”。更难得的是它没有停在写代码,后三章直接把应用装进 Docker:Dockerfile 构建镜像、Registry 管理镜像、Maven 插件自动化打包、Compose 一键起整套微服务,补齐了从开发到部署的最后一公里。作者周立长期活跃于 Spring Cloud 中文社区,写法务实,章节里对 Eureka 自我保护模式、多网卡 IP 选择、Hystrix/Feign 首次请求失败、Turbine 数据不完整这类“真正会踩的坑”也有专门收拢,第 11 章几乎就是一份线上排错清单。注意本书初版基于较早的 Spring Cloud 与 Docker 版本,动手时需对照当前版本调整依赖与配置;它更像一张思路清晰的架构地图加一份可复现的示例模板,而不是可以照抄不动的代码手册。想让微服务从 PPT 走进自己机器上的读者,值得把它放在手边。

Who it's for

A good fit for

  • 已掌握 Java 与 Spring Boot 基础、想入门微服务的后端工程师
  • 需要为团队做微服务技术选型与架构设计的技术负责人和架构师
  • 希望把 Java 应用容器化、补齐部署链路的运维与 DevOps 人员
  • 正在准备微服务相关面试、需要一套完整实践脉络的求职者

Not a good fit for

  • 完全没有 Java/Spring 基础的编程零基础读者,前置门槛较高
  • 只想学 Python、Go 等非 JVM 技术栈微服务方案的读者
  • 需要最新版本 Spring Cloud 与云原生(Kubernetes)方案、且不愿自行迁移代码的读者

Reading tips

  1. 先读第 1 至 2 章建立微服务的整体图景与组件地图,再进入代码章节,避免只见树木不见森林。
  2. 务必手敲书中“电影售票系统”案例,配套代码可在 GitHub 获取,边跑边改比只看不动手有效得多。
  3. 动手前先核对当前 Spring Cloud/Spring Boot 的版本兼容关系,书中版本较旧,依赖与配置需按新版调整。
  4. 把第 11 章的常见问题当作排错清单,遇到注册失败、监控数据缺失、首次调用超时等问题时优先回查。

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. Chapter 1 Overview of Microservice Architecture
  2. 1.1 Problems with Monolithic Application Architecture
  3. 1.2 How to Solve the Problems of Monolithic Application Architecture
  4. 1.3 What Are Microservices
  5. 1.4 Advantages and Challenges of Microservice Architecture
  6. 1.5 Microservice Design Principles
  7. 1.6 How to Implement a Microservice Architecture (Technology Selection, Architecture Diagrams, and Common Components)
  8. Chapter 2 The Microservice Development Framework: Spring Cloud
  9. 2.1 Introduction to Spring Cloud
  10. 2.2 Features of Spring Cloud
  11. 2.3 Spring Cloud Versions (Version Overview, Sub-project List, Spring Cloud/Spring Boot Version Compatibility)
  12. Chapter 3 Getting Started with Spring Cloud for Microservices in Practice
  13. 3.1 Prerequisites for Spring Cloud in Practice (Technical Background, Tools, and Software Versions)
  14. 3.2 Service Providers and Service Consumers
  15. 3.3 Writing a Service Provider
  16. 3.4 Writing a Service Consumer
  17. 3.5 Integrating Spring Boot Actuator into the Project
  18. 3.6 What Are the Problems with Hard Coding
  19. Chapter 4 Microservice Registration and Discovery
  20. 4.1 Introduction to Service Discovery
  21. 4.2 Introduction to Eureka
  22. 4.3 How Eureka Works
  23. 4.4 Writing a Eureka Server
  24. 4.5 Registering Microservices with a Eureka Server
  25. 4.6 High Availability for Eureka Server
  26. 4.7 Adding User Authentication to Eureka Server
  27. 4.8 Eureka Metadata
  28. 4.9 REST Endpoints of Eureka Server
  29. 4.10 Eureka's Self-Preservation Mode
  30. 4.11 Choosing an IP in a Multi-NIC Environment
  31. 4.12 Eureka Health Checks
  32. Chapter 5 Client-Side Load Balancing with Ribbon
  33. 5.1 Introduction to Ribbon
  34. 5.2 Integrating Ribbon into the Service Consumer
  35. 5.3 Customizing Ribbon Configuration with Java Code
  36. 5.4 Customizing Ribbon Configuration with Properties
  37. 5.5 Using Ribbon Without Eureka
  38. Chapter 6 Declarative REST Calls with Feign
  39. 6.1 Introduction to Feign
  40. 6.2 Integrating Feign into the Service Consumer

FAQ

这本书需要什么基础才能读懂?
需要具备 Java 语言基础、了解 Spring 与 Spring Boot 的基本用法(如注解、自动配置、Maven 依赖管理),并对 HTTP/REST 有概念。书中第 3.1 节也列出了作者预期的技术储备与工具版本,零基础读者建议先补 Spring Boot 再回来看。
初版和第 2 版有什么区别,该买哪本?
初版 2017 年 5 月出版,ISBN 9787121312717,基于较早的 Spring Cloud 与 Docker 版本;第 2 版 2018 年 7 月出版,ISBN 9787121340154,基于 Spring Cloud Edgware 与 Docker 17.09,并增补了新版本特性与升级避坑内容。若只能选一本,技术读者通常优先选第 2 版。
书里的技术栈现在过时了吗?
书中 Eureka、Ribbon、Hystrix、Zuul 等组件在后续版本中已进入维护或逐步被 Spring Cloud Gateway、Resilience4j 等替代,版本信息也较旧。但服务注册发现、负载均衡、容错、网关、配置中心、链路跟踪这套架构思路仍然通用,适合作为入门与思路参考,动手时需自行升级依赖。
配套代码在哪里获取?
作者在前言中给出了 GitHub 代码仓库:第 1 至 11 章案例与第 12 至 14 章 Docker 部分各有一个仓库(作者账号 itmuch 下的 spring-cloud-docker-microservice-book-code 及对应 docker 仓库)。因版本较旧,直接运行可能需要调整依赖版本。
这本书讲 Docker 的部分够用吗?
第 12 至 14 章覆盖了 Docker 架构、安装、常用命令、Dockerfile 构建镜像、Registry 管理镜像、Maven 插件打包以及 Docker Compose 编排 Spring Cloud 微服务,作为入门与落地够用,但不深入 Kubernetes、服务网格等编排进阶话题。

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