Home > Operation and Maintenance > Nginx > Is there much difference in performance between apache and nginx?

Is there much difference in performance between apache and nginx?

(*-*)浩
Release: 2019-11-02 11:14:03
Original
4194 people have browsed it

Is there much difference in performance between apache and nginx?

This is due to Nginx using the latest epoll (Linux 2.6 kernel) and kqueue (freebsd) network I/O model, while Apache The traditional select model is used. (Recommended learning: nginx tutorial)

Currently, Squid and Memcached under Linux that can withstand high concurrent access use the epoll network I/O model.

To handle the reading and writing of a large number of connections, the select network I/O model used by Apache is very inefficient.

The following uses a metaphor to analyze the difference between the select model used by Apache and the epoll model used by Nginx:

Is there much difference in performance between apache and nginx?

Assume you are studying in college, The dormitory building you live in has many rooms, and your friends are coming to find you.

select version The hostess will take your friends from room to room until they find you.

The epoll version of the dormitory aunt will first write down the room number of each student. When your friend comes, you only need to tell your friend which room you live in, without having to bring your friend with you personally. Searching the building for people.

If 10,000 people come and want to find their classmates who live in this building, it is self-evident who is more efficient in the select version or the epoll version of the dormitory aunt.

Similarly, in high-concurrency servers, polling I/O is one of the most time-consuming operations. It is also very clear which performance is higher between select and epoll.

The above is the detailed content of Is there much difference in performance between apache and nginx?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
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
Latest Issues
Error restarting nginx
From 1970-01-01 08:00:00
0
0
0
server - Nginx configuration webapp problem
From 1970-01-01 08:00:00
0
0
0
Nginx default.conf problem
From 1970-01-01 08:00:00
0
0
0
centos7 - NGINX exception occurs
From 1970-01-01 08:00:00
0
0
0
nginx load balancing
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template