Cloudfront Edge Caching: new contributed module to Community

Cloudfront Edge Caching: new contributed module to Community

With the recent version of Drupal 8 and platform deployment that requires a large number of users, in La Drupalera we have seen that it is necessary to search for third-party solutions in order to assure a good performance on web platforms. Also we know that Drupal 8 has some performance problems with Database, so we know the importance of found external solutions with minimal guarantees.

Amazon CloudFront, our best ally

An example of a service that we have discovered recently is Amazon CloudFront. This service allows an easy way of improving the performance, scalability and global scope of our platform, as well as the static and dynamic content.

Amazon CloudFront works seamlessly with dynamic web applications running in Amazon EC2 or your origin running outside of AWS without any custom coding or proprietary configurations, making the service simple to deploy and manage.

You can use a single Amazon CloudFront distribution to deliver your entire website, including both static and dynamic (or interactive) content. This means that you can continue to use a single domain name (e.g. www.example) for your entire website without the need to separate your static and dynamic content or manage multiple domain names on your website.

Amazon CloudFront enables you to include query string parameters or cookies to help customize your web pages for each viewer. You can also configure multiple cache behaviors for your web distribution based on URL patterns on your website. These cache behaviors give you granular control over how you want Amazon CloudFront to cache different portions of your website.

However, this service needs the replication of the web content in different servers throughout the world. This inconvenience needs manual external management on the Amazon Web Services platform in order to configure and refresh caches and URL patterns. In order to solve this problem, we've created CloudFront Edge Caching.

How Amazon CloudFront works

Cloudfront Edge Caching is a contributed module that allows the configuration of the necessary access parameters to the external services of Amazon Cloudfront, using the API of this service with the WS SDK PHP library. Drupal 8 manages the cache refresh automatically when the administrators update the content/users:

Cloudfront Edge Caching

The module allows  the cache of users and content to be refreshed where they are updated, through a connection with the external services. So include a config form to purge a specific URL:

Cloudfront Edge Caching Invalidate URL