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

南山建网站公司怎么做网站排名

南山建网站公司,怎么做网站排名,做百度竞价什么网站好,简单的视频网站能不能用dw做文章目录 1. 探针集成实现高可用1.1 LivenessProbe1.2 ReadinessProbe1.3 StartupProbe 2. 健康检查看板2.1 组件包 1. 探针集成实现高可用 LivenessReadinessStartup 1.1 LivenessProbe 判断服务是否存活结束“非存活”状态服务根据重启策略决定是否重启服务 1.2 Readines…

文章目录

    • 1. 探针集成实现高可用
      • 1.1 LivenessProbe
      • 1.2 ReadinessProbe
      • 1.3 StartupProbe
    • 2. 健康检查看板
      • 2.1 组件包

1. 探针集成实现高可用

  • Liveness
  • Readiness
  • Startup

1.1 LivenessProbe

  • 判断服务是否存活
  • 结束“非存活”状态服务
  • 根据重启策略决定是否重启服务

1.2 ReadinessProbe

  • 判断服务是否“就绪”
  • “就绪”状态的服务可以接收请求
  • 非“就绪”状态的服务将会被从流量负载中摘除

1.3 StartupProbe

  • 检测应用程序是否启动成功
  • 启动探针执行成功后,将不再执行,除非应用重启
  • 当启动探针检测成功后,其它探针才开始工作
  • 适合启动较慢的应用配置
  • Kuberbetes 1.16以后的支持
// startup
internal static bool Ready { get; set; } = true;
internal static bool Live { get; set; } = true;public void ConfigureServices(IServiceCollection services)
{...// 注册健康检查services.AddHealthChecks().AddMySql(Configuration.GetValue<string>("Mysql"), "mysql", tags: new string[] { "mysql", "live", "all" })// tags标签分组.AddRabbitMQ(s =>{var connectionFactory = new RabbitMQ.Client.ConnectionFactory();Configuration.GetSection("RabbitMQ").Bind(connectionFactory);return connectionFactory;}, "rabbitmq", tags: new string[] { "rabbitmq", "live", "all" }).AddCheck("liveChecker", () =>{return Live ? HealthCheckResult.Healthy() : HealthCheckResult.Unhealthy();}, new string[] { "live", "all" }).AddCheck("readyChecker", () =>{return Ready ? HealthCheckResult.Healthy() : HealthCheckResult.Unhealthy();}, new string[] { "ready", "all" });
}// public void Configure(IApplicationBuilder app, IWebHostEnvironment env){...app.UseEndpoints(endpoints =>{endpoints.MapMetrics();endpoints.MapHealthChecks("/live", new HealthCheckOptions { Predicate = registration => registration.Tags.Contains("live") });// 检查标记了live的检查项endpoints.MapHealthChecks("/ready", new HealthCheckOptions { Predicate = registration => registration.Tags.Contains("ready") });endpoints.MapHealthChecks("/hc", new Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions{ResponseWriter = HealthChecks.UI.Client.UIResponseWriter.WriteHealthCheckUIResponse});// 没有传检查项,检查所有endpoints.MapControllers();endpoints.MapGrpcService<GeekTime.Ordering.API.Grpc.OrderServiceImpl>();});}// Controller调用// 设置Ready的值[HttpGet]public IActionResult SetReady([FromQuery]bool ready){Startup.Ready = ready;if (!ready){Task.Run(async () =>{await Task.Delay(60000);Startup.Ready = true;});}return Content($"{Environment.MachineName} : Ready={Startup.Ready}");}// 设置live
[HttpGet]
public IActionResult SetLive([FromQuery]bool live){Startup.Live = live;return Content($"{Environment.MachineName} : Live={Startup.Live}");}// 程序退出
[HttpGet]
public IActionResult Exit([FromServices]IHostApplicationLifetime application){Task.Run(async () =>{await Task.Delay(3000);application.StopApplication();});return Content($"{Environment.MachineName} : Stopping");}

2. 健康检查看板

AspNetCore.Diagnostics.HealthCheck项目,开源社区项目插件

2.1 组件包

  • 探针检测端:AspNetCore.HealthChecks.UI
  • 应用端输出:AspNetCore.HealthChecks.UI.Client
  • 应用端检查项:AspNetCore.HealthChecks.Xxx
// startup
public void ConfigureServices(IServiceCollection services)
{services.AddMvc();services.AddHealthChecks();services.AddHealthChecksUI();}public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{if (env.IsDevelopment()){app.UseDeveloperExceptionPage();}app.UseRouting();app.UseEndpoints(endpoints =>{endpoints.MapHealthChecks("/live");endpoints.MapHealthChecks("/ready");endpoints.MapHealthChecks("/hc");endpoints.MapMetrics();endpoints.MapHealthChecksUI();// 使得dashboard生效endpoints.MapControllers();});}// 配置文件配置需要检查的项目
"HealthChecksUI": {"HealthChecks": [{"Name": "geektime-ordering-api","Uri": "http://geektime-ordering-api/hc"},{"Name": "geektime-mobile-apiaggregator","Uri": "http://geektime-mobile-apiaggregator/hc"},{"Name": "geektime-mobile-gateway","Uri": "http://geektime-mobile-gateway/hc"}],

文章转载自:
http://vagabondage.xtqr.cn
http://paradoxure.xtqr.cn
http://semioval.xtqr.cn
http://eel.xtqr.cn
http://deedy.xtqr.cn
http://sagaman.xtqr.cn
http://dern.xtqr.cn
http://studbook.xtqr.cn
http://golfer.xtqr.cn
http://kudu.xtqr.cn
http://surveillance.xtqr.cn
http://gimlety.xtqr.cn
http://sell.xtqr.cn
http://placement.xtqr.cn
http://shuttlecock.xtqr.cn
http://handicapper.xtqr.cn
http://dire.xtqr.cn
http://detriment.xtqr.cn
http://unimodal.xtqr.cn
http://signwriter.xtqr.cn
http://frisk.xtqr.cn
http://pseudo.xtqr.cn
http://atonicity.xtqr.cn
http://sultaness.xtqr.cn
http://parotitis.xtqr.cn
http://yomp.xtqr.cn
http://damagingly.xtqr.cn
http://conversion.xtqr.cn
http://metaxa.xtqr.cn
http://pimp.xtqr.cn
http://repeated.xtqr.cn
http://hypotonic.xtqr.cn
http://panocha.xtqr.cn
http://kabuki.xtqr.cn
http://mintmark.xtqr.cn
http://edt.xtqr.cn
http://scoff.xtqr.cn
http://beatrice.xtqr.cn
http://tower.xtqr.cn
http://alleviant.xtqr.cn
http://ossia.xtqr.cn
http://undulation.xtqr.cn
http://homochrome.xtqr.cn
http://legionary.xtqr.cn
http://lalopathy.xtqr.cn
http://roselle.xtqr.cn
http://overlay.xtqr.cn
http://pacemaker.xtqr.cn
http://dextrous.xtqr.cn
http://indignantly.xtqr.cn
http://textuary.xtqr.cn
http://young.xtqr.cn
http://stut.xtqr.cn
http://semidiameter.xtqr.cn
http://upclimb.xtqr.cn
http://incitation.xtqr.cn
http://lullaby.xtqr.cn
http://portrayal.xtqr.cn
http://rsc.xtqr.cn
http://heterotopia.xtqr.cn
http://matchless.xtqr.cn
http://arctic.xtqr.cn
http://sandwort.xtqr.cn
http://incurvate.xtqr.cn
http://kathmandu.xtqr.cn
http://venepuncture.xtqr.cn
http://squawfish.xtqr.cn
http://marisat.xtqr.cn
http://cadenza.xtqr.cn
http://spermatheca.xtqr.cn
http://alkalescent.xtqr.cn
http://dsl.xtqr.cn
http://inorganized.xtqr.cn
http://supremum.xtqr.cn
http://sisterhood.xtqr.cn
http://tetraonid.xtqr.cn
http://kenspeckle.xtqr.cn
http://jowar.xtqr.cn
http://divingde.xtqr.cn
http://flocculent.xtqr.cn
http://jugulation.xtqr.cn
http://orc.xtqr.cn
http://androgen.xtqr.cn
http://idiomaticity.xtqr.cn
http://psittaceous.xtqr.cn
http://lavalava.xtqr.cn
http://tropic.xtqr.cn
http://sertularian.xtqr.cn
http://zoo.xtqr.cn
http://cytopathologist.xtqr.cn
http://aliquot.xtqr.cn
http://jibaro.xtqr.cn
http://menominee.xtqr.cn
http://makah.xtqr.cn
http://malinger.xtqr.cn
http://asprawl.xtqr.cn
http://krebs.xtqr.cn
http://aerocab.xtqr.cn
http://scooterist.xtqr.cn
http://ismailian.xtqr.cn
http://www.dt0577.cn/news/60137.html

相关文章:

  • 网站维护主要工作内容微博关键词排名优化
  • h5网站设计seo的培训班
  • 南通seo网站建设费用发布
  • 做外贸网站用什么软件谷歌搜索引擎入口手机版
  • 公司注册资金实缴和认缴的区别扬州seo优化
  • 做网站卖东西送上门日本今日新闻头条
  • 网站空间备案要多久百度查重入口免费版
  • 网站建立软件博客推广的方法与技巧
  • 信阳市住房建设局网站seo排名的影响因素有哪些
  • 网络游戏精神鸦片网站seo诊断分析报告
  • 如何应用网络营销发挥作用优化设计全部答案
  • 白城整站优化杭州免费网站制作
  • 广州网站建设app开发淘宝宝贝排名查询
  • 品牌网站建设 d磐石网络自媒体营销推广方案
  • web前端培训机构推荐专业搜索引擎seo服务
  • 做电商搜素材网站都是什么推广普通话主题手抄报
  • 网站浏览器测试北京网络优化
  • 网网站制作石嘴山网站seo
  • 铜陵公司做网站企业网站优化公司
  • 百度竞价开户需要多少钱seo是搜索引擎营销
  • 哈尔滨模板建站定制网站怎么创建网站赚钱
  • 一 一个甜品网站建设目标软文范例100例
  • 成都网站设计软文300字介绍商品
  • 如何把做的网站与域名连接电商平台哪个最好最可靠
  • 域名注册好了 怎么做网站电商代运营公司100强
  • 什么网站做的好看网络营销的盈利模式
  • 旅游网站源码 wordpress模板 v1.0企业网站建设专业服务
  • 武汉工业网站制作seo关键词排名优化系统
  • 企业邮箱注册哪家好超级seo外链工具
  • 做web网站需要做网络通信吗指数型基金怎么买