Closed ronething-bot closed 2 years ago
edge-proxy
benchmark
client-go request.go
目前测试 200 协程没问题,500 协程有一部分(几十个)会 error,1000 的话就 error 的更多。
并发 docker image 目前评测资源分:48917.3797(submit time: 2022-08-13 15:56:54),当然也可以再测试几次,先 close,主要是为了验证并发下的请求 count 一致性问题以及类似 redis 缓存击穿问题。
缓存击穿: 一个热点的Key,有大并发集中对其进行访问,突然间这个Key失效了,导致大并发全部打在数据库上。
47870.4015(submit time: 2022-08-13 16:12:59)
49928.8520(submit time: 2022-08-13 18:45:43)
关于 no buffer space available 的问题,可以考虑增大 buffer 测试下 https://github.com/golang/go/issues/7467 https://github.com/golang/go/issues/13870 https://stackoverflow.com/questions/68778961/how-to-configure-the-buffer-size-for-http-responsewriter https://hub.docker.com/layers/library/golang/latest/images/sha256-b70f158b8d0939963f21d81523bc3a5f189fd687cf305504a91d6281bd2f732a?context=explore
Golang 网络编程: https://www.cnblogs.com/ZhuChangwu/p/13198872.html
ENOBUFS 解决方法: https://blog.csdn.net/cao849861802/article/details/117714422
socket 缓冲区: https://blog.csdn.net/mayue_web/article/details/121531311
4k or 8k 表示 net/http/server.go newBufferSize 的 size 大小
4k nums: 10, count is 24177, tps: 402/s
4k nums: 20, count is 26753, tps: 445/s
4k nums: 30, count is 27273, tps: 454/s
4k nums: 50, count is 28636, tps: 477/s
4k nums: 10000, count is 38265, tps: 637/s
8k nums: 10, count is 25842, tps: 430/s
8k nums: 20, count is 28038, tps: 467/s
8k nums: 50, count is 28001, tps: 466/s
8k nums: 100, count is 29345, tps: 489/s
8k nums: 1000, count is 31493, tps: 524/s
fix #10