当前位置:网站首页>微服务--开篇
微服务--开篇
2022-07-04 21:53:00 【喵叔哟】
从这篇文章开始我们就进入到了微服务的世界,在后续的几篇文章中我们将学习一些微服务组件的原理,以此来达到理解微服务架构的本质。
一、案例
有一个大型商城系统,由不同开发语言设计的100多个服务组成,大部分服务之间存在调用关系,如果要将这些服务的部署改为微服务部署,几乎很难使用统一的微服务框架实现。因此使用了Nginx对这些服务进行管理,先通过本地配置文件获取要调用服务的地址,再通过代码将地址组装成URL,之后服务间的调用都通过Nginx代理。
二、传统架构的问题
案例中所说的架构方式是传统的架构方式,它存在四方面的问题。
2.1 配置繁琐,上线易出错
系统每次部署、增加服务、增减机器时都需要手工配置Nginx,并且每个环境都不一样,因此在配置时很容易出错,因此在服务器变动或网络改变时都需要把每个配置梳理一次,然后进行多次的测尺才能基本保证没什么问题,但是如果没有进行详细的检查或者某些负载均衡节点出错了就很难发现。
2.2 增加机器要重启
当系统的访问量增大时,我们需要对某些服务增加服务器,但是因为需要手动配置Nginx,因此稍不留意一同就会出错,并且系统一旦出错就要重新Nginx,如果重启失败就会产生很大的影响。所以要在短时间内加服务器并保证配置准确无误,是一个很难的过程。
2.3 单点负载均衡
所有的系统都要经过Nginx代理,因此Nginx很容易成为整个系统的瓶颈,如果Nginx配置出了问题,那么所有服务都将不可用。这时一定有小伙伴说让每个服务都拥有自己的Nginx
边栏推荐
- [acwing] solution of the 58th weekly match
- 置信区间的画法
- NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
- ApacheCN 翻译、校对、笔记整理活动进度公告 2022.7
- 赋能数字经济 福昕软件出席金砖国家可持续发展高层论坛
- Zhiyang innovation signed a cooperation agreement with Huawei to jointly promote the sustainable development of shengteng AI industry
- 制作条形码的手机App推荐
- ACM multimedia 2022 | counterfactual measurement and elimination of social prejudice in visual language pre training model
- Cadre WebGIS - kalrry
- Relational database
猜你喜欢

KDD2022 | 什么特征进行交互才是有效的?

Energy momentum: how to achieve carbon neutralization in the power industry?

Scala下载和配置

从RepVgg到MobileOne,含mobileone的代码

Zhiyang innovation signed a cooperation agreement with Huawei to jointly promote the sustainable development of shengteng AI industry

Convolutional neural network model -- lenet network structure and code implementation

复数在数论、几何中的用途 - 曹则贤

Enabling digital economy Fuxin software attends the BRICs high level Forum on Sustainable Development

A large number of virtual anchors in station B were collectively forced to refund: revenue evaporated, but they still owe station B; Jobs was posthumously awarded the U.S. presidential medal of freedo

嵌入式开发:技巧和窍门——提高嵌入式软件代码质量的7个技巧
随机推荐
制作条形码的手机App推荐
GTEST from ignorance to skillful use (1) GTEST installation
sqlserver对数据进行加密、解密
283. Moving zero-c and language assisted array method
并列图的画法,多排多列
2022 version of stronger jsonpath compatibility and performance test (snack3, fastjson2, jayway.jsonpath)
File read write
HUAWEI nova 10系列发布 华为应用市场筑牢应用安全防火墙
gtest从一无所知到熟练使用(4)如何用gtest写单元测试
Application practice | Shuhai supply chain construction of data center based on Apache Doris
Cadre WebGIS - kalrry
Solve the problem of data disorder caused by slow asynchronous interface
机器学习笔记 - 互信息Mutual Information
Use blocconsumer to build responsive components and monitor status at the same time
[advanced C language] array & pointer & array written test questions
Telephone encryption, middle 4 is replaced by * * * *
1807. Replace the parentheses in the string
NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
Why should garment enterprises talk about informatization?
i.MX6ULL驱动开发 | 24 - 基于platform平台驱动模型点亮LED