: This article mainly introduces nginx's http20 performance is too backward, and HTTPS website performance is optimized. if you are interested in PHP tutorials, please refer to it. Background
On the layer-7 load layer, five physical machine branches with 24 U + 64G memory are used for https encryption and decryption and proxy_pass. During the daily work hours, the CPU of the five machines is about 50%, which is a computing type.
Optimization Methods: keepalive and TLS1.2 encryption algorithm optimization (refer to: 1, 2), etc., with little effect.
The keepalive option is very concise. no matter how the server supports it, the key is that the client does not keep with you.
Test process
Figure:
Put the traffic diagram to understand:
When AB and boom are used:
At this time, both AB and boom use-k. In any case, the measurement and time are generally at this level.
For example, the following command takes about half an hour:
Boom-c 1000-n 1000000-allow-insecure https: // 172.16.9.234/5k.jpg
AB-c 1000-n 1000000-khttps: // 172.16.9.234/5k.jpg
When the parameter is changed to http2:
H2load-c 1000-n 1000000-m1 https: // 172.16.9.234/5k.jpg
The h2load running result is as follows:
When testing http2 for h2load:
Gigabit Nic, full outbound traffic.
Conclusion
The following conclusions have been repeatedly tested and only represent my opinion. For more information, see from: toontong.
- At the same concurrency, http2.0 only took 43 seconds to transmit 4.3G data, while http1.1 took more than 40 minutes.
- The single-argument transmission performance is improved by more than 10 times, which is very effective for our key https CPU usage.
- Of course, the overall performance of the web service is not improved by 10 times. The reason is that the connection is established at the required time. more reasons are required to study the http2 principle.
- Go1.6 is available only after http2-client library support, lower version go feel can use https://github.com/tatsuhiro-t/go-nghttp2
- If we really popularize http2.0, it would be a great boon for Internet traffic and machine saving by Internet companies.
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above introduces the nginx http20 performance is too backward, HTTPS website performance optimization, including content, hope to be helpful to friends interested in PHP tutorials.