20. Nginx performance optimization

Time:2020-9-26

AB performance test

yum install httpd-tools
ab -n 100 -c 100 http://127.0.0.1/

#Concurrent quantity
Concurrency Level:      100
#Time spent on the whole test
Time taken for tests:  0.014 seconds
#Number of completed requests
Complete requests:      100
#Number of failed requests
Failed requests:        0
#Number of write errors
Write errors:          0
#Number of non-200 response codes
Non-2xx responses:      100
#Total bytes transferred
Total transferred:      37900 bytes
#HTML byte size
HTML transferred:      18500 bytes
#Number of requests per second
Requests per second:    6914.67 [#/sec] (mean)
#The time spent by the client to process each request
Time per request:      14.462 [ms] (mean)
#The time taken by the server to process each request
Time per request:      0.145 [ms] (mean, across all concurrent requests)
#Transmission speed
Transfer rate:          2559.24 [Kbytes/sec] received

Performance optimization scheme

  • How To Optimize Nginx Configuration https://www.digitalocean.com/…

Thematic reading

  • 1. Advantages of nginx
  • 2. Installation and startup of nginx
  • 3. Nginx directory and configuration syntax
  • Nx module
  • 5. Nginx static resource processing
  • 6. Nginx browser cache principle
  • 7. Cross domain access of nginx resources
  • 8. Anti theft chain of nginx resources
  • 9. Nginx agent
  • 10. Nginx load balancing
  • 11. Nginx cache
  • 12. Nginx dynamic and static separation
  • 13. Nginx Rewrite
  • 14. Nginx Secure Link
  • 15. Nginx Geo
  • 16. Nginx HTTPS service
  • 17. Nginx and Lua development
  • 18. Nginx and Lua gray Publishing
  • 19. Nginx common errors
  • 20. Nginx performance optimization
  • 21. Nginx security management