大网数据广告活动
服务器运维问答

SSL passthrough vs SSL termination + HTTPS

· 52CE 我爱测

I understand that when configuring an HTTPS load balancer, SSL termination is generally more favored for speed and the ability to inspect the data and perform actions such as add headers, whereas SSL passthrough favors security b…

问题原文

原帖链接 · Chase · CC BY-SA 4.0

I understand that when configuring an HTTPS load balancer, SSL termination is generally more favored for speed and the ability to inspect the data and perform actions such as add headers, whereas SSL passthrough favors security but uses more processing power. From what I have read, during SSL termination the SSL connection is, as the name implies, terminated when it reaches the load balancer, and typically, from there the load balancer and worker server(s) communicate over plain HTTP. The current configuration I have is like this:

client --https-->x[load balancer]--https-->[server]

Here, the SSL connection is terminated at the load balancer, but from there the load balancer initiates a new HTTPS connection with the destination server.

My question is which solution is faster, SSL passthrough or SSL termination + an additional HTTPS connection?

Note: I am using haproxy + cheap 100Mbps virtual private servers with only 1 vCore per server

已采纳解答

原帖链接 · Mircea Vutcovici · CC BY-SA 4.0

Never assume which one is faster. Using a load balancer means offloading some work to an external machine. This is usually faster because it allows more CPU for your application. But if your application is disk bound or idle, a modern CPU with SSL offloading (like AES-NI), could be faster than an old load balancer.

The advice is to always test with your specific traffic patterns. Check the load during the test. Ask yourself, where is the bottleneck? Then optimize if you have time and/or money.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-09-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。