Nginx Acceleration Stack Overview
The A Small Orange Nginx Acceleration stack is designed to provide greater scale levels for Dedicated and Cloud VPS servers that receive high amounts of traffic or require additional performance through the features provided in the acceleration stack.
The acceleration stack allows specific users to receive full-page content caching through Nginx. This is ideal if a site gets an unplanned surge in traffic or is a victim of an HTTP-based DDoS attack, where such events would typically crash or render a Cloud VPS or Dedicated server unresponsive. By using the full-page caching feature of the A Small Orange Nginx Acceleration stack, customers can continue to service requests for their most popular websites without impacting the performance and uptime of other websites they may be hosting.
The stack is powered by Nginx, an industry-standard high-performance web server set up to serve static content in a transparent reverse proxy, reducing the request load on Apache. The setup is entirely transparent to cPanel, Apache, and the underlying user setup process, ensuring a seamless integration into production systems.
Currently, the Nginx Acceleration stack is provided free of charge to existing customers. Simply file a ticket with our support team; it can be enabled in just a few minutes with no downtime. The stack comes with a convenient command line tool that allows it to be quickly enabled or disabled system-wide, along with the ability to add and remove users from dynamic content caching and modify the dynamic content cache expiration.
cPanel, LAMP, and LEMP stack compatible, using transparent reverse proxy implementation
Optimized gzip compression of all content reduces bandwidth usage
Static content (images/media files) cache to improve page load time and reduce request load on Apache
Open file descriptor cache for high-performance access to frequently used content
Dynamic page caching can be enabled on a per-user basis with configurable expiration time, reducing Apache & MySQL load
High-performance threading and cache structure allow for increased resilience to sudden traffic increases or HTTP based DDoS attacks
Zero downtime configuration changes applied in real-time for no service disruption, such as adding/removing users to nginx dynamic content cache
Enable NGinx caching service
# nginxctl -e
nginx caching service has been enabled on port 80, reverse proxy to apache on port 8080.
Enable Nginx cache for user rfxncom
# nginxctl -a rfxncom
nginx caching for rfxncom has been enabled
Set dynamic content caching to 5 minutes for user rfxncom
# nginxctl -s rfxncom 5
set dynamic content cache time to 5 minutes for user rfxncom
Remove dynamic content caching for user rfxncom
# nginxctl -d rfxncom
removed user rfxncom from nginx caching
Disable the Nginx caching service and revert Apache to the previous state
# nginxctl -x
disabled nginx caching service and apache returned to port 80
usage nginxctl: [-a|--add USER] [-d|--delete USER] [-s|--setcache USER off|N]
[-e|--enable] [-x|--disable] [-c|--clear-cache] [-t|--tmpfs]
-a, --add USER
Add user and associated domains to the nginx cache. The default cache tells nginx to retrieve static content from Apache and store it in the nginx cache, serving dynamic and static content with cache times of 10 minutes.
-s, --setcache USER off|N
Change dynamic content cache time or disable for the user and all associated domains. User argument accepts the keyword 'all' to change cache values for all users, and argument options are 'off' to disable cache or 'N' for minutes to cache dynamic content.
# disable dynamic content caching for all users
e.g., nginxctl -s all off
# set dynamic contenting cache expire to 5min for user rfxncom
e.g.: nginxctl -s rfxncom 5
Clear nginx cache contents.
-d, --delete USER
Delete user and associated domain vhosts from the nginx cache.
Enable the nginx caching service.
Disable the nginx caching service and remove all vhosts from nginx.