[2020/08/28] Tối ưu hóa Synology Web Server

Do sử dụng Docker, mọi Container sau khi cài đều ở tùy chỉnh mặc định nên cũng phải dành chút thời gian config mọi thứ để Web Server có thể chạy ngon lành. Tuy hiệu năng không thể đạt được như với Hades vì dù sao cũng thua kém về mặt phần cứng, nhưng chí ít cũng cố gắng ở mức tốt nhất có thể.

Hardware

– Add more RAM from 4GB to 8GB

HAProxy

– Newest version
– Easy config as TLS Termination for Apache

Apache

– Disable .htaccess, Rewrite Rules move into configuration files
– Enable brotli compress
– Optimize configurations

MariaDB

– Newest version 10.4
– Default charset utf8mb4, Default collation utf8mb4_vietnamese_ci
– Socket internal connection
– InnoDB Large Prefix

Redis

– Newest version
– Socket connection
– Using for PHP Session Cache and PHP Object Cache

PHP

– Newest version 7.4
– FPM with Socket connection
– php.ini customization
– Only install some necessary Extensions for WordPress: exif, gd, imagick, zip
– Zend Opcache (very important)
– igbinary as primary Serializer handler
– zstd compression support
– Redis is now storing PHP Sessions
– Redis Object Cache in combination with igbinary and zstd for WordPress