Tweaks - Apache Booster - High Performance - High Traffic Site Print

  • 0

Environment:


High traffic video / audio / article site - Similar to a news channel
cPanel Server with Apache Booster Installed
nproc = 64
RAM = 256 Gb

Apache Booster uses Nginx, Varnish & Apache.

Please find a basic to medium level of Performance Tweak to support such sites. This might vary. Always use with Caution.
--

Sl No Technology Config File Parameter Explanation Recommended Values
1 Varnish dynamic_file.vcl set beresp.ttl = 300s; Defines the TTL for dynamic content, such as blog posts or news articles. set beresp.ttl = 300s; (5 minutes for dynamic content)
2 Varnish static_file.vcl set beresp.ttl = 3600m; Defines the TTL for static content like images, videos, and stylesheets. set beresp.ttl = 86400s; (1 day for static content)
3 Varnish leverage_cache.vcl set beresp.http.cache-control = "max-age = 3600"; Specifies cache-control headers for caching content. set beresp.http.cache-control = "max-age=3600"; (1 hour)
4 NGINX nginx.conf worker_processes Defines the number of worker processes NGINX uses to handle requests. worker_processes 64; (One process per CPU core)
5 NGINX nginx.conf worker_connections Specifies the number of simultaneous connections each worker process can handle. worker_connections 20240; (Monitor based on traffic)
6 NGINX nginx.conf client_max_body_size Defines the maximum size of client request bodies. Used for handling file uploads. client_max_body_size 100M; (Increase based on video size)
7 NGINX nginx.conf proxy_buffer_size Specifies the size of the buffer for proxied server responses. proxy_buffer_size 128k; (Optimize for large dynamic content)
8 NGINX nginx.conf proxy_buffers Defines the number and size of buffers for proxying large responses. proxy_buffers 4 256k;
9 NGINX nginx.conf proxy_read_timeout Sets the timeout for reading a response from the proxied server. proxy_read_timeout 300s; (To handle long video streaming)
10 NGINX nginx.conf gzip Enables GZIP compression to reduce bandwidth for static content like HTML, JS, and CSS. gzip on; (For static content)
11 Apache httpd.conf ServerLimit Specifies the maximum number of Apache processes. Affects the server's concurrency limit. ServerLimit 5000; (Increase based on traffic)
12 Apache httpd.conf MaxRequestWorkers Limits the number of simultaneous client connections Apache can handle. MaxRequestWorkers 15000; (Can increase to 20,000)
13 Apache httpd.conf MaxConnectionsPerChild Sets the maximum number of connections handled by a single Apache child process before it is restarted. MaxConnectionsPerChild 20000; (Useful for handling high connections)
14 Apache httpd.conf KeepAliveTimeout Timeout for keep-alive connections. It impacts how long an idle connection is kept open. KeepAliveTimeout 3-5; (Reduce to optimize resources)
15 Apache httpd.conf Timeout The maximum time Apache waits for a request to complete, affecting slow uploads. Timeout 60; (For large file uploads)
16 Apache httpd.conf mod_deflate Compresses dynamic content for better performance. SetOutputFilter DEFLATE (For compressing text-based files)



--

MySQL tweaks if asked can be recommended. Not added here.

-
Regards,
Ryder

 


Was this answer helpful?

« Back