上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 70 下一页
摘要: 国内网络访问国外资源经常会出现不稳定的情况,目前需要搭建CDN代理,目前有 # 启用 Go Modules 功能 go env -w GO111MODULE=on # 配置 GOPROXY 环境变量,以下三选一 # 1. 七牛 CDN go env -w GOPROXY=https://goprox 阅读全文
posted @ 2023-07-25 16:17 codestacklinuxer 阅读(33) 评论(0) 推荐(0)
摘要: 断言 // 目的是检查 *QueryEncode 类型是否满足了 Adder 接口。 // 在这里,Adder 是一个接口类型,QueryEncode 是一个具体的类型。QueryEncode 类型是否实现了add 接口 var _ Adder = (*QueryEncode)(nil) 反射 x 阅读全文
posted @ 2023-07-14 11:20 codestacklinuxer 阅读(52) 评论(0) 推荐(0)
摘要: 目前使用net/http 长连接 连接池复用时,出现连接一直都在关闭重连, strace 后发现没有read respone 只读取了head,但是body没有读取, google后看到官方问题,确实记录需要代码实现读取body逻辑来清空socket内核缓存,以便后面复用。 需要读取respone里 阅读全文
posted @ 2023-07-13 16:03 codestacklinuxer 阅读(312) 评论(0) 推荐(1)
摘要: 4.2. Algorithm Organization The BBR algorithm is an event-driven algorithm that executes steps upon the following events: connection initialization, u 阅读全文
posted @ 2023-07-02 16:41 codestacklinuxer 阅读(176) 评论(0) 推荐(0)
摘要: brr 算法流程: bbr算是一个完全独立的拥塞算法,具有自己的拥塞状态机.tcp_cong_control函数已经被bbr_main函数接管了 static void tcp_cong_control(struct sock *sk, u32 ack, u32 acked_sacked, int 阅读全文
posted @ 2023-06-27 20:28 codestacklinuxer 阅读(513) 评论(0) 推荐(0)
摘要: Initialization Steps Upon transport connection initialization, BBR executes the following steps: BBRInit(): init_windowed_max_filter(filter=BBR.BtlBwF 阅读全文
posted @ 2023-06-26 17:26 codestacklinuxer 阅读(149) 评论(0) 推荐(0)
摘要: **Network Path Model** BBR is a model-based congestion control algorithm: its behavior is based on an explicit model of the network path over which a 阅读全文
posted @ 2023-06-26 11:28 codestacklinuxer 阅读(164) 评论(0) 推荐(0)
摘要: 在查看google的BBR算法时,里面出现了一个 startup gain的推到过程: For simplicity, let RTT=1 unit of time. For smooth traffic to avoid queue pressure, we want the sending ra 阅读全文
posted @ 2023-06-20 20:18 codestacklinuxer 阅读(86) 评论(0) 推荐(0)
摘要: 注意: “_”是特殊标识符,用来忽略结果。 iota是go语言的常量计数器,只能在常量的表达式中使用。 iota在const关键字出现时将被重置为0。const中每新增一行常量声明将使iota计数一次(iota可理解为const语句块中的行索引) slice 并不是数组或数组指针。它通过内部指针和相 阅读全文
posted @ 2023-05-20 23:38 codestacklinuxer 阅读(61) 评论(0) 推荐(0)
摘要: HTTP协议的Cache -Control指定请求和响应遵循的缓存机制。在请求消息或响应消息中设置 Cache-Control并不会影响另一个消息处理过程中的缓存处理过程。请求时的缓存指令包括: no-cache、no-store、max-age、 max-stale、min-fresh、only- 阅读全文
posted @ 2023-05-14 16:46 codestacklinuxer 阅读(61) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 70 下一页