Home  >  Article  >  Operation and Maintenance  >  varnish nginx difference

varnish nginx difference

(*-*)浩
(*-*)浩Original
2019-07-15 10:33:364669browse

varnish nginx difference

Varnish

High-performance, open source reverse proxy server and memory cache server.

Advantages:

1. High performance;

2. Multi-core support;

3. Supports precise cache time of 0-60 seconds.

Disadvantages:

1. It does not have automatic fault tolerance and recovery functions, and data will be lost after restarting;

2. Online expansion is difficult.

3. The maximum cache file size on 32-bit machines is 2GB;

4. Clustering is not supported.

Application scenarios: small systems and applications that do not require large concurrency.

Nginx

1. Dynamic links with parameters are not supported.

2. There is no mechanism for cache expiration and cleanup inside the Nginx cache. These cached files will be permanently stored on the machine. If there are a lot of things to be cached, it will fill up the entire hard disk space.

3. Only 200 status codes can be cached, so status codes such as 301/302/404 returned by the backend will not be cached. If there happens to be a pseudo-static link with a large number of visits that is deleted, it will Continuous penetration causes the backend to bear a lot of pressure

4.Nginx will not automatically select memory or hard disk as the storage medium. Everything is determined by the configuration. Of course, there will be operating system-level files in the current operating system. Caching mechanism, so there is no need to worry too much about IO performance problems caused by large concurrent reads if it is stored on the hard disk.

Difference:

Cache acceleration (static acceleration, bandwidth saving, edge push): Varnish >Nginx

Reverse proxy (routing acceleration, Hide the master node): Nginx > Varnish

For more Nginx related technical articles, please visit the Nginx Usage Tutorial column to learn!

The above is the detailed content of varnish nginx difference. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn