Tos Web Developer provides insights, tutorials, and advice around topics including content strategy, design, Drupal Development, Drupal Custom Module Development, Drupal 8 Custom themes, PHP, Server, Twig, and more

                               

  •  Using Nginx instead of Apache

Nginx and Apache, both are widely used web servers. Nginx has an edge over Apache on performance benchmarks. It is also faster and more efficient than apache. Nginx performs 2.5 times faster than Apache according to a benchmark test running up to 1,000 simultaneous connections.

  • HTTP/2.0 over HTTP/1.1

HTTP/2.0 supports multiplexing, which is unlike HTTP/1.1 which blocks other resources. If one resource cannot be loaded, HTTP/2.0 uses a TCP connection to send multiple streams of data at once. HTTP/2.0 uses advanced header compression techniques than HTTP/1.1

Nginx configuration for HTTP/2.0
 server {  
   listen 443 ssl http2; //http2 settings  
   ssl_certificate server.crt;  
   ssl_certificate_key server.key;  
 }  
  • Serving Compressed Content

Compressing responses often significantly reduce the size of transmitted data. However, since compression happens at runtime, it can also add considerable processing overhead which can negatively affect performance.

Nginx configuration to serve compressed content:

 server {  
   gzip on;  
   gzip_static on;    
   gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;  
   gzip_proxied any;  
   gzip_vary on;  
   gzip_comp_level 6;  
   gzip_buffers 16 8k;  
   gzip_http_version 1.1;    
   ...  
 }  


  • MariaDB instead of MySQL

MariaDB has improved speed as compared to MySQL. It provides faster caching and indexing than MySQL. It is almost 24% faster than MySql in this case. There are other key metrics also where MariaDB is better than MySQL. So, MariaDB is preferred over MySQL in terms of performance.

  • CDN

CDN stands for content delivery network. It is a cluster of servers spread across the globe (a.k.a., points of presence, or PoPs), which works together to deliver the content faster. CDN stores the cached version of the site content and delivers the content from the nearest available server. Some of the popular CDN providers are Cloudflare, Amazon CloudFront, Google Cloud CDN, etc.

No comments:

Post a Comment

| Designed And Blog Post by www.toswebdeveloper.com