What was the main reason for creating Nginx?
Think about what problem web servers faced when many users connect at once.
Nginx was created to efficiently handle many simultaneous connections using an event-driven architecture, which uses less memory and CPU compared to traditional servers.
Which problem does Nginx solve better than older web servers like Apache?
Focus on how servers behave under heavy user load.
Nginx uses an event-driven model to handle many connections at once, which helps it stay fast and stable under heavy traffic.
What is the output of the command ps aux | grep nginx after starting Nginx with 4 worker processes?
worker_processes 4;Remember how Nginx manages processes for handling requests.
Nginx runs one master process and multiple worker processes. Setting worker_processes 4; creates four workers plus one master process.
You try to start Nginx but it fails with an error about the port being in use. What is the most likely cause?
Think about what prevents a server from binding to a port.
If another program is already using the port Nginx wants, Nginx cannot start because only one program can listen on a port at a time.
Which Nginx configuration setting is best to improve performance under very high traffic?
Consider how to let Nginx use all CPU cores and handle many connections.
Setting worker_processes auto; lets Nginx use all CPU cores. Increasing worker_connections allows each worker to handle more connections, improving performance under load.