Varnish Study Notes

Source: Internet
Author: User

Varnish Study Notes

Varnish cache is an open-source high-performance cache server. Compared with the old Squid, Squid has the following advantages.

1: varnish is based on memory cache data, so the processing speed is faster than Squid.

2: varnish supports a higher concurrency and is more stable than Squid.

3: varnish can be managed through ports, but squid does not.

4: the disadvantage of varnish is that if the service is down, all memory data is released.

Varnish's working mode. First, varnish has two processes, one management process, which initializes the worker process, loads and compiles the vcl configuration file, and initializes the data structure. The worker process generates multiple threads: the thread that processes the request, the thread that manages the thread pool, the worker thread, the scheduling thread, and the thread that detects the cache expiration time. Generally, varnish supports two thread pools. Each thread pool has a maximum of 500 working threads and a minimum of five. Therefore, you can concurrently connect to 1000 threads.

The request process of varnish is vcl_recv vcl_pass vcl_pipe vcl_hash vcl_hit vcl_miss vcl_fetch vcl_deliver.

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.