Why MaxCDN Uses NGINX to Deliver Your Content
February 10, 2015 | Esteban Borges
Nginx is a high performance web server, load balancer, and proxy that our CDN network uses to deliver our customers’ content as fast as possible.
In the past few years, more high-traffic websites have started using Nginx as their high performance server. Basically, the popularity Apache started losing in 2011 has been picked up by Nginx, making it today’s most popular web server for the top 1,000 busiest websites. Nginx was also growing steadily at 2% when Netcraft conducted its August 2014 Nginx study.
Here’s an illustration of the study’s main findings:
We don’t just use Nginx because it’s popular, though. We use it because it’s event-driven, effectively handles large traffic spikes, and helps us scale our network. It also helps us make cool $#!+ and offer next-gen performance features to our customers.
Key Features that Make Nginx Cool
Key components of Nginx include:
- Multiple protocol support (HTTP, HTTPS, WebSocket, IMAP, POP3, SMTP)
- SSL Termination (TLSv1.1/TLSv1.2/SSL/SNI/PFS/PCI-DSS and OCSP Stapling)
- HTTP video streaming using MP4/FLV/HDS/HLS
- Caching static & dynamic content
- Content compression
- Header manipulation
- Request filtering
- Extended monitoring and logging
- Upgrades without downtime using live binaries
- Graceful restart with non-stop request processing
- Complete reverse proxy and load balancer
These components team up to power our network and quickly deliver all the content cached on it. They also complement all the Nginx awesomeness mentioned below.
Rock Solid Architecture
Nginx and Apache are the most used open source web servers. However, for a long time, system administrators have always used Apache as the default web server for their online projects. This became a problem though when they were working on projects that needed to handle big traffic. Apache is a solid server, but isn’t necessarily good for handling tons of traffic efficiently.
This is where Nginx rises to power though. Using its advanced architecture illustrated below, Nginx outperforms Apache in terms of RAM, CPU, and number of requests served. It is also event-driven unlike traditional servers. This means it doesn’t need to spawn new processes or threads for each served request, resulting in lower levels of memory usage.
Image source: Architecture of Open Source Applications
Nginx now ranks as the second most used open source web server. It’s also great for all kind of operating systems like Linux, even Windows. Without a doubt, it’s a smart choice for developers from all platforms, and we especially love it because of our dedication to open source.
RAM and CPU usage are incredibly small given the tons of content this beast can handle. Videos, images, even dynamic pages can be served without any out-of-the-box tuning. It’s fair to say that Nginx offers 3x better performance than traditional servers.
Native built-in load balancing and proxy capabilities, plus the way its core was designed, makes it perfect for scalability. Because scalability is an essential part of our CDN (seen our latest #MaxScale post?), it’s much easier to bring our CDN to scale with Nginx on our side.
If you have any questions about how to use Nginx, how to install it, or how to configure it, there’s a big community behind the server that can help you get the answers to your most pressing questions:
Want to learn more about our relationship with Nginx and how it helps us help you deliver your content as fast as possible? Then go ahead and download our Nginx whitepaper: How MaxCDN Built a World-Class CDN Using NGINX. It shows you how we brought our CDN to scale and became one of the fastest CDNs in the world.