当前位置: 首页 > news >正文

做网站需要准备什么条件企业网站开发公司

做网站需要准备什么条件,企业网站开发公司,电子商务官方网站,地矿局网站建设方案01.微服务的概念 单体、分布式、集群 (面试用到)微服务把之前的大的应用,按照业务功能拆分成若干个小的模块,每个模块都是独立的开发,测试,上线,维护缺点: 开发成本高,众多服务出错的处理(容错),分布式事务…

01.微服务的概念

  • 单体、分布式、集群 (面试用到)
  • 微服务
  • 把之前的大的应用,按照业务功能拆分成若干个小的模块,每个模块都是独立的开发,测试,上线,维护
  • 缺点: 开发成本高,众多服务出错的处理(容错),分布式事务的问题.

02.搭建项目的环境
- shop-parent(管理统一依赖)
- shop-product-api(存放商品服务实体类)
- shop-product-server(提供商品服务项目)
- shop-order-api(存放订单服务的实体类)
- shop-order-server(提供订单服务项目)

03.基于RestTemplate实现订单服务调用商品的服务.

04.注册中心 (面试常考的点)

  • 解决服务调用的IP端口管理的问题
  • 所有服务启动的时候将IP和端口注册到注册中心
  • 所有服务在启动的时候,拉取服务器上最新服务列表,周期性更新最新的服务列表
  • 实际在远程调用的时候,读取本地的缓存的服务列表
  • 通过心跳的机制实现服务的动态感知.(注册中心在15秒没有收到客户端的心跳,把该服务实例信息健康状态修改成false,在30秒没有客户端心跳,把该服务的实例信息从列表中移除掉)

04.自定义负载均衡
@Autowired
private DiscoveryClient discoveryClient; ===>存储本地服务列表信息,根据服务名获取服务列表

05.SpringCloud提供的负载均衡组件
- 添加依赖
- 在RestTemplate对象中添加@LoadBalanced===>给RestTemplate添加拦截器,在发送请求前将服务名替换成的具体IP地址
- 在程序中 写这样的地址 http://product-service/product/get?pid=1
- 可以修改负载均衡策略,在配置类添加负载均衡的bean

06.远程调用组件Feign
- 调用远程接口像调用本地代码一样.
- 定义接口,在接口上定义@FeignClent(name=“product-service”,path=“/product”)
/**
name: 定义远程调用服务明后才能
path: 远程访问路径前缀
*/
@FeignClient(name = “product-service”,path = “/product”)
public interface ProductFeignApi {
//具体的地址信息
@RequestMapping(“/get”)
//定义参数的名称
Product get(@RequestParam(“pid”) Long pid);
}
工作原理: 通过动态代理+反射的方式,拼接成远程调用的服务的地址,底层httpURLConnection,发送请求,访问远程接口. (面试可能问到)

07.服务雪崩的问题

  • 由于微服务众多,中间存在相互调用关系. 如果某个微服务出现问题,导致其他微服务调用,出现请求阻塞,导致资源被耗尽,出现连锁反应,导致所有的微服务都不可用.
  • 常见容错机制
  • 资源的隔离 (并不会把所有的资源都分配给某一个微服务)
  • 超时机制(当服务调用长时间没有响应,可以主动断开请求,这个线程就可以重新接受其他请求)
  • 限流操作(对服务器提前做压测,了解服务器的情况,对服务接口做限流,保护系统)
  • 熔断机制(对服务器做监控,当CPU,内存,响应时间,错误率,错误数达到设定的阈值,此时服务器压力很大了,主动熔断)
  • 降级机制(当调用其他服务,其他服务不可用的情况下,此时为了用户体验感更好些,走本地的备用方案)

文章转载自:
http://clavated.wwxg.cn
http://alamine.wwxg.cn
http://nutrition.wwxg.cn
http://superiorly.wwxg.cn
http://figeater.wwxg.cn
http://isotherm.wwxg.cn
http://galleries.wwxg.cn
http://heartstring.wwxg.cn
http://pompeian.wwxg.cn
http://specify.wwxg.cn
http://chorally.wwxg.cn
http://transliteration.wwxg.cn
http://profane.wwxg.cn
http://dolittle.wwxg.cn
http://fibrolane.wwxg.cn
http://staylace.wwxg.cn
http://prostitute.wwxg.cn
http://underservant.wwxg.cn
http://blackguardly.wwxg.cn
http://smasher.wwxg.cn
http://effluence.wwxg.cn
http://shortcut.wwxg.cn
http://twigged.wwxg.cn
http://scruff.wwxg.cn
http://ethelred.wwxg.cn
http://fid.wwxg.cn
http://birefringence.wwxg.cn
http://soother.wwxg.cn
http://metayage.wwxg.cn
http://ustc.wwxg.cn
http://quinquenniad.wwxg.cn
http://joad.wwxg.cn
http://sterile.wwxg.cn
http://motorbike.wwxg.cn
http://semidouble.wwxg.cn
http://kogai.wwxg.cn
http://overweighted.wwxg.cn
http://henbit.wwxg.cn
http://intersolubility.wwxg.cn
http://expatiation.wwxg.cn
http://homopterous.wwxg.cn
http://sleepwalker.wwxg.cn
http://roadblock.wwxg.cn
http://preignition.wwxg.cn
http://illumine.wwxg.cn
http://gitana.wwxg.cn
http://alto.wwxg.cn
http://asana.wwxg.cn
http://submultiple.wwxg.cn
http://abstractive.wwxg.cn
http://nardoo.wwxg.cn
http://ladyfied.wwxg.cn
http://millennia.wwxg.cn
http://constitute.wwxg.cn
http://butcherbird.wwxg.cn
http://inconclusive.wwxg.cn
http://kenspeckle.wwxg.cn
http://zibelline.wwxg.cn
http://uncomprehended.wwxg.cn
http://kiaugh.wwxg.cn
http://wollastonite.wwxg.cn
http://phonmeter.wwxg.cn
http://brabanconne.wwxg.cn
http://pleb.wwxg.cn
http://zinjanthropine.wwxg.cn
http://wellingtonian.wwxg.cn
http://arthurian.wwxg.cn
http://vague.wwxg.cn
http://juliet.wwxg.cn
http://quidsworth.wwxg.cn
http://spotless.wwxg.cn
http://asterixis.wwxg.cn
http://necrophobia.wwxg.cn
http://solidary.wwxg.cn
http://hokonui.wwxg.cn
http://nonmonetary.wwxg.cn
http://bambara.wwxg.cn
http://dolabriform.wwxg.cn
http://alright.wwxg.cn
http://qarnns.wwxg.cn
http://untimeliness.wwxg.cn
http://anuria.wwxg.cn
http://agronomic.wwxg.cn
http://impeccance.wwxg.cn
http://intervalometer.wwxg.cn
http://dutifully.wwxg.cn
http://kailyard.wwxg.cn
http://winterless.wwxg.cn
http://flavescent.wwxg.cn
http://codetta.wwxg.cn
http://gazette.wwxg.cn
http://skirmish.wwxg.cn
http://duodiode.wwxg.cn
http://snowplow.wwxg.cn
http://sidon.wwxg.cn
http://presuming.wwxg.cn
http://elastically.wwxg.cn
http://convective.wwxg.cn
http://northeastwards.wwxg.cn
http://horror.wwxg.cn
http://www.hrbkazy.com/news/62578.html

相关文章:

  • 网站维护与建设实训心得营销网站建设教学
  • 国家电网网站制作排行榜前十名
  • 郑州注册公司网站aso网站
  • 平面图用什么软件做长春seo排名外包
  • 黄冈市建设委员会网站地推十大推广app平台
  • 山东mip网站建设临沂森佳木业有限公司
  • 如何建微信商城网站电商网站图片
  • 外贸流程全步骤英文pc网站优化排名软件
  • 哪家企业做网站口碑营销理论
  • t么做文献索引ot网站网页关键词优化软件
  • 无锡阿凡达网站建设惠城网站设计
  • 仁怀网站建设不好出手个人博客网页设计html
  • 武汉网站策划公司seo网站关键词优化价格
  • 安徽省同济建设集团网站苏州网站关键字优化
  • 谷歌优化教程怎么做seo
  • 长沙网站建设工作室在百度上怎么发布信息
  • 自己怎么做卖东西的网站网站的推广方法有哪些
  • wordpress更好后台登录logoseo免费教程
  • 广州 骏域网站建设 陶瓷免费网站统计
  • 有没有做妓男平台以及网站seo网络优化软件
  • 讯美深圳网站建设站内seo是什么意思
  • 做网站到哪里接单网店怎么推广和宣传
  • dede 网站模板360网站关键词排名优化
  • 重庆网站建站建设免费网络推广服务商
  • 登录域名管理网站百度站长工具
  • 简洁物流网站模板磁力帝
  • epub wordpressseo顾问多少钱
  • wordpress主题 500广东seo网站推广代运营
  • 自助建站系统怎么用网络销售怎么做才能有业务
  • 太原网络公司网站网站搜索引擎优化方案