Back then, many web servers were not able to handle more than 10,000 connections simultaneously.
Igor Sysoev, the creator of NGINX, started developing this software in 2002 to answer the C10K problem.
Much like Apache, NGINX is open-source and free to use. It’s also one of the fastest-growing web servers in the industry, having reached the number two position in market share. NGINX – pronounced as “ Engine X ” – is one of the most reliable servers for scalability and speed.
With Apache’s modules, users can easily add or remove functions, modifying their server to meet their needs. As a result, the web server also works well with many content management systems (CMS), programming languages, and web frameworks.Īpache is particularly popular due to the power and flexibility that come from its module system. What’s more, the Apache web server is also part of the LAMP stack, one of the first open-source software stacks for web development. The Apache web server supports many operating systems (OS) such as Microsoft Windows, OpenVMS, and any Unix-like OS like Linux and macOS. It was also the dominant web server on the early world wide web.Īpache HTTP Server currently powers around 33.9% of websites worldwide and holds the number one position in market share as one of the oldest web servers. It processes client requests and serves web content via Hypertext Transfer Protocol (HTTP).Īpache web server was released in 1995 and has been since maintained by the Apache Software Foundation. The Apache HTTP Server – commonly referred to as Apache or Apache HTTPD – is free, open-source web server software. Directory-Level Configuration for NGINX and Apacheīefore we start comparing Apache vs NGINX, let’s explore the differences between web servers and their general characteristics.Performance Comparison – Static vs Dynamic Content.Basic Architecture – Handling Connections.Also ensure you are using daemon mode of mod_wsgi for running the Django application as that is a better architecture and provides lots more options for setting timeouts so you can have your application recover from various situations which might otherwise cause the server to lock up when overloaded.įor a system which provides a better out of the box configuration and experience than using Apache/mod_wsgi directly and configuring it yourself, look at using mod_wsgi-express. You can do this using virtual hosts in Apache. That way you avoid heavy weight cookie information being sent for all static file requests.
More important than separate web server is that if using Apache/mod_wsgi, serve the static files under a different host name. So don't get ahead of yourself if you are just starting out and think you need a Google/Facebook scale solution from the outset. For the majority of people, Apache alone is still a more than acceptable solution.
The difference is that nginx uses a full async model, whereas Apache relies on processes and/or threading for concurrency, although event MPM uses an async model for initial request acceptance and keep alive connections now. Apache keeps persistent processes to handle concurrent and subsequent requests just like nginx. Apache doesn't spawn a new process for each static file.