About Nginx
- It is an open-source, fast, lightweight and high-performance asynchronous web server.
- It is used for HTTP web serving, reverse proxy with caching, load balancing, websockets, handling static files and many more.
- It can handle a higher number of concurrent requests.
- It has faster static content delivery with low resource usage.
How Does Nginx Works ?
From javatpoint
- Nginx divided its job into the worker process and worker connections.
- Worker connections are used to manage the request made and the response obtained by users on the web server.
- At the same time, these requests are passed to its parent process which is called the worker process.
Difference between apache and nginx
- Apache uses a multi-threaded approach to process client requests. But Nginx follows an event-driven approach to serve client requests.
- In Apache, a single thread can only process one connection. But in nginx, A single thread can handle multiple connections.