Skip to content

Commit

Permalink
添加章节链接
Browse files Browse the repository at this point in the history
  • Loading branch information
icpd committed Jun 10, 2023
1 parent c51e387 commit d30178c
Show file tree
Hide file tree
Showing 70 changed files with 276 additions and 7 deletions.
3 changes: 3 additions & 0 deletions appendix/multi_process_gc/multi_process_gc.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,6 @@ if (pid == 0) {
- 假设经观测获得内存消耗速度为每分钟20GB
- M = (5 + 20 + 3) \* 20 / 60 = 9.4GB
## links
上一章:[第三十四章 如何开发BFE扩展模块](../../develop/how_to_write_module/how_to_write_module.md)
3 changes: 3 additions & 0 deletions background/what-is-bfe.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,6 @@ BFE平台是由很多模块构成的一个比较复杂的分布式系统,可




## links
下一章:[第二章 网络前端接入技术简介](../frontend_principle/introduction/introduction.md)
4 changes: 4 additions & 0 deletions design/comparison/comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@

注:Nginx商业版支持动态配置,在不重启进程的情况下热加载配置生效


## links
上一章:[第五章 BFE的设计思想](../../design/ideas/ideas.md)
下一章:[第七章 BFE的转发模型](../../design/model/model.md)
5 changes: 4 additions & 1 deletion design/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ func (t *ProductRuleTable) Update(conf productRuleConf) {
}
```

以上这两个接口,使用读写锁来保护。并且,在临界区中的操作都尽量简单,以降低对多个处理协程间并行度的影响。
以上这两个接口,使用读写锁来保护。并且,在临界区中的操作都尽量简单,以降低对多个处理协程间并行度的影响。
## links
上一章:[第十五章 超时设置](../../design/timeout/timeout.md)
下一章:[第十七章 HTTPS优化机制](../../design/https/https.md)
5 changes: 4 additions & 1 deletion design/gslb/gslb.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,7 @@ BFE向下游转发请求时,支持将相同来源请求,转发至固定的
BFE支持以下两种会话保持级别:

- 子集群级别:相同来源的请求,被转发至固定的业务子集群(注:子集群中的任意实例)
- 实例级别:相同来源的请求,被转发至固定的业务实例
- 实例级别:相同来源的请求,被转发至固定的业务实例
## links
上一章:[第八章 BFE的路由转发机制](../../design/route/route.md)
下一章:[第十章 BFE的模块插件机制](../../design/module/module.md)
5 changes: 4 additions & 1 deletion design/health_check/health_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@

BFE开源项目目前只支持被动健康检查。基于BFE开源项目所实现的商业版产品中包含了集中式的主动健康检查。

未来将在BFE开源项目中增加分布式的主动健康检查。
未来将在BFE开源项目中增加分布式的主动健康检查。
## links
上一章:[第十章 BFE的模块插件机制](../../design/module/module.md)
下一章:[第十二章 限流机制](../../design/limit/limit.md)
4 changes: 4 additions & 0 deletions design/https/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,7 @@ CA成为HTTPS网站稳定性风险的一个新的来源。CA厂商的选型是

HTTPS站点在有条件情况下可以通过签发多个CA厂商的证书实现冗余互备。当某个CA厂商证书访问连通率异常时,可以快速切换迁移至其它CA证书止损。


## links
上一章:[第十六章 配置管理](../../design/configuration/configuration.md)
下一章:[第十八章 信息的透传](../../design/info_pass_through/pass_through.md)
5 changes: 4 additions & 1 deletion design/ideas/ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@

以上这些内容将在后续中的章节中给出详细的说明。

![dict service refactor](./dict_service.png)
![dict service refactor](./dict_service.png)
## links
上一章:[第四章 网络负载均衡技术简介](../../frontend_principle/load_balance/load_balance.md)
下一章:[第六章 BFE和相关开源项目的对比](../../design/comparison/comparison.md)
4 changes: 4 additions & 0 deletions design/info_pass_through/pass_through.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,7 @@ BFE在扩展模块mod_header中默认提供了捎带客户端IP地址和端口
| %client_cert_subject_province | 客户端证书Subject Province | |
| %client_cert_subject_country | 客户端证书Subject Country | |
| %client_cert_subject_locality | 客户端证书Subject Locality | |

## links
上一章:[第十七章 HTTPS优化机制](../../design/https/https.md)
下一章:[第十九章 BFE服务的安装部署](../../operation/installation/installation.md)
5 changes: 4 additions & 1 deletion design/limit/limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,7 @@

基于计数器,限流可以精确到单个请求的粒度;内网流量调度的生效基于BFE处设置的权重,控制粒度较粗



## links
上一章:[第十一章 健康检查机制](../../design/health_check/health_check.md)
下一章:[第十三章 监控机制](../../design/monitor/monitor.md)
4 changes: 4 additions & 0 deletions design/log/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ BFE的访问日志由BFE的扩展模块mod_access来输出。BFE的访问日志

mod_access提供了模板配置能力,用户可以对请求日志和会话日志中输出的数据字段做定制。


## links
上一章:[第十三章 监控机制](../../design/monitor/monitor.md)
下一章:[第十五章 超时设置](../../design/timeout/timeout.md)
4 changes: 4 additions & 0 deletions design/model/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,7 @@ demo-static使用demo.example.com域名来对外提供服务。在3个数据中

一个常见的问题是,在公用转发资源的情况下,如何解决转发资源的冲突问题。在某些情况下,可能会由于一个业务的流量突发,对共享资源的其它业务产生干扰。在共享资源的模式下,这种情况肯定是无法完全避免的。对比网络中传统QoS问题的解决,有两种思路:增加对业务使用资源的复杂控制机制;不做复杂的控制机制,而靠供应足够的资源来解决。从以往的历史经验看,在互联网的技术发展过程中下第二种思路取得了胜利。在七层负载均衡转发场景下,使用复杂的控制机制必然会导致额外的资源消耗,我们选用的机制是不使用复杂的控制机制、而提供足够的共享资源。如果真的有某个业务有特别大的流量,则可以通过在四层负载均衡上对对应业务的Virtual Server限速来解决。


## links
上一章:[第六章 BFE和相关开源项目的对比](../../design/comparison/comparison.md)
下一章:[第八章 BFE的路由转发机制](../../design/route/route.md)
5 changes: 4 additions & 1 deletion design/module/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ BFE转发过程中的回调点如下图所示。
| | mod_trace | 根据自定义的条件,为请求开启分布式跟踪 |
| | mod_http_code | 统计HTTP响应状态码 |

可以通过访问BFE实例的 http://localhost:8299/monitor/module_handlers 监控地址,查看到当前运行的BFE实例中所有的回调点、在各回调点注册的模块回调函数列表以及顺序。
可以通过访问BFE实例的 http://localhost:8299/monitor/module_handlers 监控地址,查看到当前运行的BFE实例中所有的回调点、在各回调点注册的模块回调函数列表以及顺序。
## links
上一章:[第九章 BFE的内网流量调度机制](../../design/gslb/gslb.md)
下一章:[第十一章 健康检查机制](../../design/health_check/health_check.md)
5 changes: 4 additions & 1 deletion design/monitor/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,7 @@ func (m *BfeMonitor) WebHandlersInit(srv *BfeServer) error {
}
```

以上是BFE主逻辑注册回调函数的逻辑。在各扩展模块,也有独立的注册逻辑,可以参考"[如何开发BFE扩展模块](../../develop/how_to_write_module/how_to_write_module.md)"中的说明。
以上是BFE主逻辑注册回调函数的逻辑。在各扩展模块,也有独立的注册逻辑,可以参考"[如何开发BFE扩展模块](../../develop/how_to_write_module/how_to_write_module.md)"中的说明。
## links
上一章:[第十二章 限流机制](../../design/limit/limit.md)
下一章:[第十四章 日志机制](../../design/log/log.md)
4 changes: 4 additions & 0 deletions design/route/route.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,7 @@ BFE开源项目所支持条件原语的列表,可以查看[BFE开源官网](ht
- 注:这类条件原语不合理使用将明显影响性能,谨慎使用
- **contain**: 字符串包含匹配
- 如:req_cookie_value_contain()

## links
上一章:[第七章 BFE的转发模型](../../design/model/model.md)
下一章:[第九章 BFE的内网流量调度机制](../../design/gslb/gslb.md)
4 changes: 4 additions & 0 deletions design/timeout/timeout.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,7 @@ BFE和后端实例间通信的超时包括:




## links
上一章:[第十四章 日志机制](../../design/log/log.md)
下一章:[第十六章 配置管理](../../design/configuration/configuration.md)
4 changes: 4 additions & 0 deletions develop/how_to_write_module/how_to_write_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,7 @@ func (m *ModuleBlock) globalBlockHandler(session *bfe_basic.Session) int {
...
}
```
## links
上一章:[第三十三章 核心协议实现](../../implementation/protocol/protocol.md)
下一章:[附1 BFE的多进程GC机制](../../appendix/multi_process_gc/multi_process_gc.md)
3 changes: 3 additions & 0 deletions en_us/appendix/multi_process_gc/multi_process_gc.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ Under the "multi-process rotation" mechanism, due to the active shutdown of GC i
- Assume that the memory consumption rate is 20GB per minute from observation
- M = (5 + 20 + 3) \* 20 / 60 = 9.4GB
## links
Previous: [Chap 34 How to Develop BFE Extension Module](../../../en_us/develop/how_to_write_module/how_to_write_module.md)
3 changes: 3 additions & 0 deletions en_us/background/what-is-bfe.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,6 @@ At present, the BFE open source project is the forwarding engine in the BFE plat
Rich and detailed monitoring indicators are built in BFE, which can fully grasp the system status with third-party monitoring systems (such as Zabbix and Prometheus)

The above contents will be introduced in detail in the following chapters

## links
Next: [Chap2 Introduction to Network Front End](../../en_us/frontend_principle/introduction/introduction.md)
4 changes: 4 additions & 0 deletions en_us/design/comparison/comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,7 @@ While Nginx and Envoy can do nothing with wrong memory usage. Debugging such a b

NOTE: Nginx Plus supports hot-reload of configuration, with no process restart.


## links
Previous: [Chap5 Design Considerations of BFE](../../../en_us/design/ideas/ideas.md)
Next: [Chap7 Forwarding Model of BFE](../../../en_us/design/model/model.md)
4 changes: 4 additions & 0 deletions en_us/design/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@ func (t *ProductRuleTable) Update(conf productRuleConf) {
```

The above two interfaces are protected by read-write locks. Moreover, the operation in the critical section should be as simple as possible to reduce the impact on the parallelism of multiple processing coroutines.

## links
Previous: [Chap15 Timeout Setting](../../../en_us/design/timeout/timeout.md)
Next: [Chap17 HTTPS Optimization](../../../en_us/design/https/https.md)
4 changes: 4 additions & 0 deletions en_us/design/gslb/gslb.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@ Session stickiness is supported for the following two levels:

- Sub cluster level: requests of the same session are forwarded to the same sub cluster (may be different instances in this sub cluster).
- Instance level: requests of the same session are forwarded to the same instance.

## links
Previous: [Chap8 Traffic Routing](../../../en_us/design/route/route.md)
Next: [Chap10 Plugin Architecture](../../../en_us/design/module/module.md)
4 changes: 4 additions & 0 deletions en_us/design/health_check/health_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,7 @@ When the load balancer instance uses the active health check results obtained fr
## Health Check of BFE

BFE open source project currently only supports passive health checks. The commercial product implemented based on the BFE open source project includes centralized active health check.

## links
Previous: [Chap10 Plugin Architecture](../../../en_us/design/module/module.md)
Next: [Chap12 Traffic Limiting](../../../en_us/design/limit/limit.md)
4 changes: 4 additions & 0 deletions en_us/design/https/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,7 @@ CA has become a new source of HTTPS website stability risk. The selection of CA
With the large-scale popularization of HTTPS, major failures of HTTPS caused by mainstream CAs are not uncommon in recent years. For example, in 2016, GlobalSign affected many well-known large websites due to OCSP service failure. In 2018, due to the security violation of Verisign, the world's largest CA, browsers such as Chrome/Firefox/Safari stopped trusting the certificates issued by Symantec.

HTTPS sites can achieve redundancy and mutual backup by issuing certificates from multiple CAs if conditions permit. When a CA's certificate access connectivity is abnormal, it can quickly switch and migrate to other CA certificates to stop loss.

## links
Previous: [Chap16 Configuration Management](../../../en_us/design/configuration/configuration.md)
Next: [Chap18 Information Passthrough](../../../en_us/design/info_pass_through/pass_through.md)
4 changes: 4 additions & 0 deletions en_us/design/ideas/ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ Refactoring the BFE forwarding engine based on Go is not just a change of progra
The above contents will be described in detail in the following chapters.

![dict service refactor](./dict_service.png)

## links
Previous: [Chap4 Introduction to Network Load Balancing Technology](../../../en_us/frontend_principle/load_balance/load_balance.md)
Next: [Chap6 Comparison to Similar Systems](../../../en_us/design/comparison/comparison.md)
4 changes: 4 additions & 0 deletions en_us/design/info_pass_through/pass_through.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,7 @@ In the above example, built-in variables are used when setting "X-Bfe-Log-Id" an
| %client_cert_subject_organizational_unit | Subject Organizational Unit of client certificate |
| %client_cert_subject_province | Subject Province of client certificate |
| %client_cert_subject_country | Subject Country of client certificate |

## links
Previous: [Chap17 HTTPS Optimization](../../../en_us/design/https/https.md)
Next: [Chap19 Installation And Deployment of BFE Service](../../../en_us/operation/installation/installation.md)
4 changes: 4 additions & 0 deletions en_us/design/limit/limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,7 @@ In terms of overload protection capability, there are the following differences
+ Granularity of taking effect

Based on counters, traffic limiting can be accurate to the granularity of a single request; The effectiveness of intranet traffic scheduling is based on the weight set at BFE, and the control granularity is coarse.

## links
Previous: [Chap11 Health Check](../../../en_us/design/health_check/health_check.md)
Next: [Chap13 Status Monitoring](../../../en_us/design/monitor/monitor.md)
4 changes: 4 additions & 0 deletions en_us/design/log/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ BFE uses log library in [https://github.com/baidu/go-lib](https://github.com/bai
Access log of BFE is outputed by extension module mod_access. BFE's access logs include "Request" and "Session" logs. The session corresponds to the TCP connection established between the client and BFE. A session may contain multiple requests.

mod_access provides template configuration capabilities, and users can customize the data fields output in the request log and session log.

## links
Previous: [Chap13 Status Monitoring](../../../en_us/design/monitor/monitor.md)
Next: [Chap15 Timeout Setting](../../../en_us/design/timeout/timeout.md)
4 changes: 4 additions & 0 deletions en_us/design/model/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ This is a common method in many companies. For different services, build an inde
This is the method adopted by Baidu. BFE platform is a platform that supports multiple tenants. Thousands of tenants share layer-7 load balancing resources. The shared BFE cluster has sufficient capacity to resist traffic burst or attack traffic. To achieve it, the forwarding engine is required to have multi tenant support, so as to isolate the configuration between multiple tenants; In addition, it is also required to provide platform support for multiple tenants to initiate configuration changes at the same time.

A common problem is how to solve the conflict of resources in the case of sharing forwarding resources. In some cases, the traffic burst of one service may interfere with other services sharing resources. In the mode of sharing resources, this situation cannot be completely avoided. Similar to network QoS, there are two possible solutions: add a complex mechanism for controlling use of resources; not use complex control mechanism, but provide sufficient resources. From the historical experience, the second way has been successful in the Internet. In the layer-7 load balancer scenario, the use of complex control mechanisms will inevitably lead to additional resource consumption. The choice we made was not to use complex control mechanisms, but to provide sufficient resources. If there is a certain service with very large traffic, it can be solved by limiting traffic of the VS(Virtual Server) of the corresponding service on the layer-4 load balancer.

## links
Previous: [Chap6 Comparison to Similar Systems](../../../en_us/design/comparison/comparison.md)
Next: [Chap8 Traffic Routing](../../../en_us/design/route/route.md)
4 changes: 4 additions & 0 deletions en_us/design/module/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ In the directory **/bfe_modules/<module_name>** of BFE source code, there are a
| | mod_http_code | mod_http_code reports statistics of HTTP response codes. |

You can access the address for monitor http://localhost:8421/monitor/module_handlers to view all callback points in the running BFE instance, the list of module callback functions registered at each callback point and the order.

## links
Previous: [Chap9 Traffic Scheduling](../../../en_us/design/gslb/gslb.md)
Next: [Chap11 Health Check](../../../en_us/design/health_check/health_check.md)
4 changes: 4 additions & 0 deletions en_us/design/monitor/monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,7 @@ func (m *BfeMonitor) WebHandlersInit(srv *BfeServer) error {
```

The above is the logic of the callback function in BFE main program. There are also independent registration logic for each extension module. Please refer to the description in "[How to develop BFE extension module](../../development/how_to_write_module/how_to_write_module. md)".

## links
Previous: [Chap12 Traffic Limiting](../../../en_us/design/limit/limit.md)
Next: [Chap14 Logging Mechanism](../../../en_us/design/log/log.md)
4 changes: 4 additions & 0 deletions en_us/design/route/route.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,7 @@ For the full list of condition primitives supported by BFE, please see [BFE open
- Warning: Inappropriate use can significantly affect performance
- **contain**: string match
- eg. req_cookie_value_contain()

## links
Previous: [Chap7 Forwarding Model of BFE](../../../en_us/design/model/model.md)
Next: [Chap9 Traffic Scheduling](../../../en_us/design/gslb/gslb.md)
4 changes: 4 additions & 0 deletions en_us/design/timeout/timeout.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,7 @@ The timeout of communication between BFE and backend instance includes:




## links
Previous: [Chap14 Logging Mechanism](../../../en_us/design/log/log.md)
Next: [Chap16 Configuration Management](../../../en_us/design/configuration/configuration.md)
4 changes: 4 additions & 0 deletions en_us/develop/how_to_write_module/how_to_write_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,7 @@ func (m *ModuleBlock) globalBlockHandler(session *bfe_basic.Session) int {
...
}
```
## links
Previous: [Chap33 Implementation of Core Protocols](../../../en_us/implementation/protocol/protocol.md)
Next: [Appendix1 Multi-process GC mechanism of BFE](../../../en_us/appendix/multi_process_gc/multi_process_gc.md)
4 changes: 4 additions & 0 deletions en_us/frontend_principle/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ As a large Internet enterprise, Baidu has a complex scene of multiple regions an
+ BFE: layer-7 load balancing system. Provide application layer load balancing service.

As a sub function of BFE, GSLB provides intranet traffic scheduling with cluster granularity across data centers.

## links
Previous: [Chap1 Introduction to BFE](../../../en_us/background/what-is-bfe.md)
Next: [Chap3 Trend of Network Front End Technology](../../../en_us/frontend_principle/trend/trend.md)
4 changes: 4 additions & 0 deletions en_us/frontend_principle/load_balance/load_balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ The following figure illustrates the mixed use of the layer-4 load balancing sof




## links
Previous: [Chap3 Trend of Network Front End Technology](../../../en_us/frontend_principle/trend/trend.md)
Next: [Chap5 Design Considerations of BFE](../../../en_us/design/ideas/ideas.md)
Loading

0 comments on commit d30178c

Please sign in to comment.