初识springcloud(微服务)

1、微服务的定义(microservice)

(1)多个微服务开发的依然是一个完整的应用
(2)微服务都会独立运行在一个独立的进程里面
(3)微服务之间通常会采用轻量级的通信机制来进行通信,比如http https socket netty dubbo thrift
(4)通常采用自动化部署方式, devops cicd docker、 K8s、 service mesh、云原生
(5)通常都是去中心化的,也就是假如某个节点挂了,而不会影响其他节点
(6)这些微服务可以通过不同的编程语言实现 订单:java 天气:python

这是忘了谁来着给的定义:

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.

但拆分过程中,往往不是一帆风顺 腾阳课

  • (1)服务注册与发现

nacos[ali]、eureka[netflix]

  • (2)服务调用

dubbo[ali]

  • (3)负载均衡

ribbon[netflix]

  • (4)路由网关

zuul[netflix]

  • (5)分布式事务

seata[ali]

  • (6)异步消息通信

(7)等等

而其中这些由Netflix 、Ali 互联网大厂根据所需的业务需求开发了一系列的中间件,未解决分布式架构所带来的问题,当然springcloud本身也有自己写好的实现功能组件,像:springcloud Gateway、springcloud Security 等等

在这里插入图片描述
我理解的是:springcloud在springboot的基础上,提供了一系列的“接口”和规范,这些“接口”,供一些大厂集成了的中间件(一些公共基础功能)来实现服务之间调用和独立运行。
在这里插入图片描述
拿服务注册与发现,举例:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43889487/article/details/121944066