# fwatchdog 介绍 - `fwatchdog` 与 `8080` 端口的关系: - 默认监听端口:fwatchdog默认监听8080端口,用于接收HTTP请求。 - 端口配置:可以通过环境变量 `port` 来更改fwatchdog监听的端口。 - 功能: 1. 检查fwatchdog的健康状态: ``` curl http://<ip_for_function>:8080/_/health # 返回 Ok ``` 2. 检查fwatchdog是否准备好处理请求: ``` curl http://<ip_for_function>:8080/_/ready ``` 3. 发送自定义请求,fwatchdog会对8080/* 将其他任何路径和 HTTP verbs 发送到该函数: ``` # 这将会转发到函数的 /echo 目录下 curl -X POST http://<ip_for_function>:8080/echo -d "hello!" ``` # ISSUES: 目前存在问题: 1. (下面假设函数已经通过cni部署在10.66.0.3)curl http://10.66.0.3:8080/_/ready 返回Ok,但是 curl http://10.66.0.3:8080 一直没有收到返回的数据包(最终显示 curl: (52) Empty reply from server) 2. 但是容器本身没有问题,curl http://10.66.0.3:3000 能够正常返回GET请求的返回体(注:3000是我的容器写死的监听端口) 我的临时解决方案: - 不管fwatchdog的8080转发,直接在env中读取upstream_url的端口(如3000),绑定进network_config里,从而可以实现proxy转发。 - 但就失去了fwatchdog的转发的功能,不良构。
fwatchdog 介绍
fwatchdog与8080端口的关系:port来更改fwatchdog监听的端口。ISSUES:
目前存在问题:
我的临时解决方案: