Skip to content

Commit

Permalink
✏️性能优化
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcaffebabe committed Jul 12, 2023
1 parent 3459eb7 commit 8e086e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/软件工程/性能工程/性能优化.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,11 @@ sequenceDiagram

1. 连接建立成功后,拥塞控制算法就会发生作用,首先进入慢启动阶段。决定连接此时网速的是初始拥塞窗口,改它。通常,在带宽时延积较大的网络中,应当调高初始拥塞窗口
2. 可以通过 tcp_congestion_control 配置以 BBR 算法为代表的测量型拥塞控制算法

### TLS优化

1. 对称加密算法:选择安全性高且性能好的对称加密算法,如AES-GCM,该算法能够充分利用多核CPU的并行计算能力
2. 密钥协商算法:选择性能较好的密钥协商算法,如基于椭圆曲线的ECDH算法,尤其是X25519曲线。
3. 会话复用和缓存:通过长连接复用会话,减少密钥协商次数,并使用会话缓存和会话票据。
4. 升级到TLS1.3:提升握手速度(减少了一次RTT)和安全性,限制不安全算法,难以进行降级攻击

0 comments on commit 8e086e1

Please sign in to comment.