Varnish performance Test

Source: Internet
Author: User


To test the performance gains from a reverse proxy server, test performance data comparisons using a reverse proxy server and not using a reverse proxy server.
1. Do not use reverse proxy
Test a picture 57817 bytes of a picture to make 1000 requests, the concurrency is 100, the performance data is as follows:



After many tests, it was found that Apache processes 4500~5000 requests per second without using a reverse proxy.

2. Next, use the varnish reverse proxy to accelerate the HTTP request.



However, it is found that the number of requests processed per second has not been significantly improved. Apache processes 5500~6000 Requests per second.
View the next Header



Indicates that the varnish reverse proxy server has been successfully turned on, but why is the acceleration not obvious? Then command line input varnishstat to view the Varnish monitor program. As follows:

Explain the following information: Cache_hit varnish the number of times to find and hit buffers in the cache. Cache_miss varnish The number of buffers that were found in the cache but not hit. Client_req the cumulative number of HTTP requests sent by the browser to the varnish reverse proxy finds a good hit rate, increasing concurrency and requesting a trial:

Also 5,000 requests for the picture, the concurrency is 1000, the performance data is as follows: When the varnish reverse proxy is not used:


After many tests, it was found that Apache processes 200~500 requests per second without using a reverse proxy.

To continue testing in the case of using a reverse proxy:





Well, this is a clear effect. It's about 4500~5500.
Configuration problems with varnish: The configuration in the/etc/varnish/default.vcl file is as follows; (no cache rules, try configuring cache rules later)



In the/etc/varnish/varnish.params file



The listening port is 6081, which is explained below, can be set at startup-a parameter, or set the Varnish_listen_port port in the Varnish.params file. That is, in the stress test to go varnish reverse proxy, you need to add 6081 port number.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.