当前位置:网站首页>一. 基础概念
一. 基础概念
2022-07-07 18:09:00 【orange_?】
单纯的做一个学习笔记,哔哩哔哩上面有视频。
1. 微服务
微服务架构风格,就是把一个单独的应用程序 开发成一套 小服务,每一个小服务都是一个独立的进程。并使用轻量级的通信保持服务之间的沟通,通常是HTTP。这些服务围绕着业务能力来构建,并通过完全的自动化部署机制来独立部署。这些服务可以使用不同的语言编写,以及不同数据存储技术,并保持最低度的集中式管理。
简而言之:拒绝大型单体应用,基于业务边界进行服务微化拆分,各个服务独立运行部署。
2. 集群 & 分布式 & 节点
集群是物理形态,分布式是个工作方式。
只要是一堆机器,就可以叫集群,他们是不是一起协作着工作,这个谁也不知道。
《分布式系统原理与规范》定义:
“ 分布式系统是诺干独立于计算机的集合,这些计算机对于用户来说就像单个相关系统 ”
分布式系统是建立在网络之上的软件系统。
(1) 分布式是指将不同的业务分布在不同的地方
(2) 集群指的是将几台服务器集中在一起,实现同一业务
(3) 分布式中的每一个节点,都可以叫做集群。而集群并不一定就是分布式
3. 远程调用
在分布式系统中,各个服务可能处于不同主机,但是服务之间不可避免的需要互相调用,我们称为远程调用。
SpringCloud 中使用 HTTP + JSON 的方式完成远程调用。
4. 负载均衡
分布式系统中,A服务需要调用B服务,B服务在多台机器中都存在,A调用任意一个服务器均可完成功能。
为了使每一个服务器都不要太忙或者太闲,我们可以负载均衡的调用每一个服务器,提升网站的性能。
常见的负载均衡算法:
轮询:为第一个请求选择健康池中的第一个后端服务器,然后按顺序往后一次选择,直到最后一个,然后循环。
最小连接:优先选择连接数量最少,也就是压力最小的后端服务器,在会话
散列:根据请求源 IP 的散列(hash)来选择要转发的服务器。这种方式可以一定程度上保证特定用户能连接到相同的服务器。如果你的应用需要处理状态而要求用户能连接到和之前相同的服务器,可以考虑这种方式。
5. 服务注册/发现 & 注册中心
A服务调用B服务,A服务不知道B服务当前在哪几台服务器有,哪些正常的,哪些服务已经下线。解决这个问题可以引入注册中心。
6. 配置中心
每一个服务最终都有大量的配置,并且每个服务都可能部署在多台机器上。我们经常需要变更配置,我们可以让每个服务在配置中心获取自己的配置。
7. 服务熔断 & 服务降级
8. API网关
在微服务架构中,API Gateway 作为整体架构的重要组件,它抽象了微服务中需要的公共功能,同时提供了客户端负载均衡,服务自动熔断,灰度发布,统一认证,限流流控,日志统计等丰富的功能,帮助我们解决很多API管理的难题。
谷丽架构图
边栏推荐
- Force buckle 599 Minimum index sum of two lists
- Creation of kubernetes mysql8
- JVM GC垃圾回收简述
- R language dplyr package select function, group_ The by function, filter function and do function obtain the third largest value of a specific numerical data column in a specified level in a specified
- Traversal of Oracle stored procedures
- Sword finger offer II 013 Sum of two-dimensional submatrix
- Equals method
- The DBSCAN function of FPC package of R language performs density clustering analysis on data, checks the clustering labels of all samples, and the table function calculates the two-dimensional contin
- The state cyberspace Office released the measures for data exit security assessment: 100000 information provided overseas needs to be declared
- Version selection of boot and cloud
猜你喜欢
Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决
Vulnhub tre1
School 1 of vulnhub
【哲思与实战】程序设计之道
数据孤岛是企业数字化转型遇到的第一道险关
Welcome to the markdown editor
Opencv learning notes high dynamic range (HDR) imaging
论文解读(ValidUtil)《Rethinking the Setting of Semi-supervised Learning on Graphs》
LeetCode力扣(剑指offer 36-39)36. 二叉搜索树与双向链表37. 序列化二叉树38. 字符串的排列39. 数组中出现次数超过一半的数字
How to test CIS chip?
随机推荐
MIT science and technology review article: AgI hype around Gato and other models may make people ignore the really important issues
BI的边界:BI不适合做什么?主数据、MarTech?该如何扩展?
搞定带WebKitFormBoundary post登录
Get webkitformboundary post login
R language ggplot2 visualization: use the ggqqplot function of ggpubr package to visualize the QQ graph (Quantitative quantitative plot)
Force buckle 912 Sort array
Force buckle 88 Merge two ordered arrays
vulnhub之tre1
Semantic SLAM源码解析
831. KMP字符串
剑指 Offer II 013. 二维子矩阵的和
CIS芯片测试到底怎么测?
Chapter 9 Yunji datacanvas company won the highest honor of the "fifth digital finance innovation competition"!
ASP. Net kindergarten chain management system source code
CUDA versions are inconsistent, and errors are reported when compiling apex
Force buckle 1790 Can two strings be equal by performing string exchange only once
Boot 和 Cloud 的版本选型
Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决
ASP. Net gymnasium integrated member management system source code, free sharing
R language dplyr package select function, group_ The by function, filter function and do function obtain the third largest value of a specific numerical data column in a specified level in a specified