In short, the microservice architectural style [1] is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.
首先,Spring Cloud 具备一个天生的优势,因为它是 Spring 家庭的一员,而 Spring 在 Java EE 开发领域的强大地位,给 Spring Cloud 起到很好的推动作用。同时,Spring Cloud 所基于的 Spring Boot,已经成为 Java EE 领域中最流行的开发框架,用来简化 Spring 应用程序的框架搭建和开发过程。
其次,技术组件的完备性是我们选择 Spring Cloud 的主要原因。Spring Cloud 中包含了开发一个完整的微服务系统所需的几乎所有技术组件,包括服务注册和发现、API 网关、配置中心、消息处理、负载均衡、熔断器、数据监控等常见技术组件都可以基于 Spring Boot 快速集成到业务系统中。
Spring Cloud Alibaba是国产的微服务开发一站式解决方案,与原有 Spring Cloud 兼容的同时对微服务生态进行扩展,通过添加少量的配置注解,便可实现更符合国情的微服务架构,当前Spring Cloud Alibaba已经是直接隶属于 Spring Cloud 的子项目。官网是:https://spring.io/projects/spring-cloud-alibaba#overview
Spring Cloud Alibaba 对服务注册、配置中心与负载均衡功能都整合进 Nacos,有图形化界面,简化了微服务架构的复杂度,出问题的概率也会降低。原有的服务保护组件也调整为 Sentinel,相较Hystrix功能更强大,使用也更加友好。同时还支持了对Dubbo的调用,而且还有Seata用于支持分布式事务。