NJAL: Rapid Pantheon Migration & Drupal 8 Performance Tuning

NJAL: Rapid Pantheon Migration & Drupal 8 Performance Tuning


Facet migrated NJAL to Pantheon, reduced infrastructure costs, patched performance issues, and launched a new subscription tier in 12 weeks. 

Visit NJAL


NJAL was left in a lurch as they needed to move away from another development agency relationship that had turned sour. They had heavily overrun their costs, and NJAL was left with a heavy monthly AWS bill. 

NJAL was deployed on an autoscaling load-balanced high availability AWS infrastructure. The autoscaling was ramping up monthly costs as misconfigurations in Drupal 8 were not performant. Increases in the number of daily active users heavily increased NJAL’s costs as they quickly reached 6 to 8 servers. An unnecessary cost for a fledgling startup. 

Amid the hustle to change infrastructure providers, NJAL needed to rapidly launch a new subscription tier—a product decision that had no forethought when the site was first built.


Not Just A Label offers premium subscription to fashion designers—providing premier perks to their members in the form of small business services: preferred shipping rates, discounted pricing, and access to promote their store through their portfolio on the site. NJAL built up the membership with the focus on these premier perks, but many designers simply wanted to promote their store amid their international peers. 

NJAL’s opportunity to grow required an expansion of tiered roles and permissions from 1-tier to a 2-tier system, as well as a simplification of site architecture to reduce the expensive infrastructure load. 


Drupal 8 Best Practices Assessment

Facet quickly onboarded NJAL and reviewed the site architecture and AWS infrastructure against our Drupal best practices checklist. While the site was robustly developed with clean code, there were a number of missed quality of deployment steps that needed to be checked: appropriate caching, configuration management switching per-deployment environment, and parametrization of environment specific Drupal settings. 

Rapid Pantheon Onboarding

Facet leveraged its status as a Platinum Premier Partner to fast-track conversations with Pantheon and onboard NJAL to one of the Performance packages. A critical sticking point for this migration was NJAL’s massive media library. A plethora of image styles multiplied out the amount of images stored in S3, and the previous method of Amazon EFS + EC2 is not compatible for local public and private file stream access with Pantheon. We deployed s3fs, and to our dismay found the migration of the 300GB of files quite lengthy. Rewriting some custom code, refactoring display suite, and updating some views—we were over the hurdles and live on Pantheon in two short weeks. 

Drupal 8 Commerce Subscription 2-Tier System

While Drupal 8 Commerce supports recurring subscriptions with the commerce_recurring module, the underlying code is a skeleton that requires customization in order to add new product tiers, manage credit cards on file, and otherwise perform operations that you would usually take for granted with any recurring subscription e-commerce site. NJAL had none of this pre-existing e-commerce functionality built, and so we took a path of least resistance to deploy a second tier without rebuilding the subscription service from scratch.

With credit card subscription management sorted, we updated the checkout flow for multi-tier subscription, and updated the user experience for checkout. The value of the two tier system needed to be clearly delineated. 

Drupal 8 Performance Tuning

NJAL had two minor misconfigurations in custom code that led to big waits for the front-end site performance. 

The first was the misuse of an image style preprocessor within a display suite template. Extremely large images were in use on designer profiles to give their work a larger-than-life feel. These images, once we migrated to Pantheon, were getting preprocessed in the template and hanging on wait times from S3 for the images to load. We refactored the preprocessing of images so that the image styles were batch generated upon image upload and content save, thereby removing the need to preprocess images at the time of rendering the page.

The second was a custom Instagram widget embedded into each designers profile. The images were asynchronously called from Instagram, and page load times were heavily dependent upon Instagram’s API response and availability of media assets. To optimize the loading of these images, we implemented the imagecache_external module and set a long-expiry time. 

With these two optimizations in place, pagespeed performance was reduced from an order of 10 to 40 seconds on first page load of a designer profile, to less than 2 seconds. 

While working through these issues we also enabled these Drupal 8 performance best practices:

  • Leverage Google Tag Manager to package asynchronous firing of third-party scripts. 

  • Refactor views across the site to appropriately leverage content-permanent caching techniques, so we can depend on explicit cache expiries and Pantheon’s advanced cache.


In 12 weeks, Facet refactored Drupal 8 for better configuration management, best practices, and performance—onboarding to Pantheon and reducing long-term infrastructure costs.


Subscription Tier Launched


Media Migrated to S3