In recent days we have worked a lot on optimizing the connections and net of our infrastructure; some net-security-protocols have been changed, the cache of our content- [Contents: every content intended as text, images, audio or video] - delivery network- [Network of Contents: is the channel in which owners can post their content and the audience can see the contents posted by the owners] - (Cloudflare) has been optimized, HTTP/2 has been activated, the scripting language (PHP) has been customized for maximum performances, the super fast disk cache and memory cache has been activated, the database and its caching options have also been optimized. The result is impressive, it is the following:
Network security in mind
We have updated the network protocols by inserting TLS encryption- [Encryption: to change electronic information or signals into a secret code (= system of letters, numbers, or symbols) that people cannot understand or use on normal equipment] - at the network level, this means that all queries regarding the DNS (even those of the webserver and scripting languages) are encrypted at the outset to travel safely. The DNS over TLS technology establishes a TLS-protected connection between the client and the resolver by default. This protects transmitted DNS queries and responses from espionage and sabotage by man-in-the-middle attacks. While we have activated DNS over HTTPS for all internal connections affecting all browsers. To know more about these two new technology, you can read here: https://www.cloudflare.com/learning/dns/dns-over-tls/
Furthermore, we already use Cloudflare’s authoritative DNS for our domains without ever leaving our provider for any network connection, adding an additional level of privacy. Below is the test we completed which shows the use of the two technologies in our infrastructure:
Content delivery network cache, disk cache and memory cache
Since the change in our infrastructure we immediately thought about the speed of the systems and we configured the systems to take full advantage of the new nvme SSD which can simultaneously write and read the disk at an impressive speed, therefore we installed the operating systems and databases on that disk. NVMe (nonvolatile memory express) is a new storage access- [Access the simple access to a website as a visitor] - and transport protocol for flash and next-generation solid-state drives (SSDs) that delivers the highest throughput and fastest response times yet for all types of enterprise workloads. We then configured a super-fast disk cache and optimized the content delivery network cache, the result was impressive with a page loading speed of less than a second. The PHP scripting language has also been customized and configured with an in-memory cache that does the rest of the work.
HTTP/2 and database optimization
HTTP/2 revolutionizes the web by making better use of network resources. Version 2.0 is a major revision of the HTTP protocol, which is the backbone of the World Wide Web. Thanks to the improvements and optimizations it brings about, it enhances the performance and efficiency of the internet. The HTTP/2 protocol makes the internet faster and more efficient by compressing information and executing multiple requests simultaneously, which reduces load speed. After activating the HTTP/2 protocol we also optimized the databases with better performing cache options.
Results and benefits
We have achieved impressive results; MYETV homepage loading time dropped dramatically to under one second, hovering around 0.8 seconds; the first contentful paint is around 0.6 seconds while the largest contentful paint is around 0.7 seconds. These were visible to the naked eye with an improvement of over 500% compared to previous configurations.