- Using Nginx instead of Apache
- HTTP/2.0 over 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
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