Drupal · 14 min read · Updated

Acquia Search, Integrations and Drupal Performance Tuning on Cloud Next

One search index per environment, integrations that fail safely, then Drupal performance tuning for a launch with 24 times normal traffic.

Acquia search integrations drupal performance tuning

This is Part 6 of 10 in Drupal on Acquia: Enterprise Operations Guide, a free series for the people who run Drupal sites on Acquia Cloud Platform. One search index per environment, integrations that fail safely, then Drupal performance tuning for a launch with 24 times normal traffic.

Search, files and integrations

The corporate site’s search results had been wrong for weeks before anyone noticed. A product manager searched for a product launched a month earlier and found nothing. Investigation showed that the search index had been receiving content from the Stage environment as well as production. Testers had created dozens of fake products on Stage, and those were in the index too, while some real production content had been overwritten by older Stage versions.

Drupal sites rarely work alone. They depend on search services, file storage, digital asset management systems, CRMs, marketing tools and other APIs. Each connection is a place where environments can cross wires, credentials can leak, or failures can go unnoticed. This section covers the most common integrations on Acquia.

Each environment talks only to its own index and to test versions of external systems (diagram from the Drupal on Acquia: Enterprise Operations Guide series)
Each environment talks only to its own index and to test versions of external systems.

Acquia Search provides hosted search for Drupal sites, integrated with Drupal’s Search API module. At the time of writing, the current service is Acquia Search powered by SearchStax, which provides managed Solr-based search. Older applications may use the previous generation of Acquia Search, and Acquia provides documentation for managing indexes on both.

One index per environment

The most important rule for search is that each environment should write only to its own index. Production content goes to the production index. Stage and Dev either have their own indexes or are set to read-only, so they cannot write to production’s index.

Acquia’s documentation shows how to set Acquia Search to read-only on non-production environments in settings.php:

if (!isset($_ENV['AH_SITE_ENVIRONMENT'])
  || $_ENV['AH_SITE_ENVIRONMENT'] !== 'prod') {
  $settings['acquia_search']['read_only'] = TRUE;
}

Check the current documentation for your search generation, since the exact settings can differ. Whatever method you use, verify it: create test content on Stage and confirm it does not appear in production search results.

Indexing and reindexing

Search API indexes content as it is created and updated, often in batches during cron. Plan for:

  • Indexing backlogs: monitor the number of items waiting to be indexed. A growing backlog means cron is not running often enough or indexing is failing.
  • Reindexing: changes to the index configuration, such as new fields, require reindexing. On large sites, reindexing can take hours. Run it outside peak times, using Drush rather than the browser, and never inside a deployment hook (see the Cloud Hooks section).
  • Schema and configuration changes: test them on a non-production index first.

Files

Each Acquia environment has its own file storage, shared across the servers or containers in that environment. Drupal’s public files are served through Varnish and the CDN; private files are served through Drupal with access checks.

Good practice for files on Acquia:

  • Keep files out of Git. Uploaded files belong in file storage, not the repository.
  • Store private files outside docroot, in the location Acquia’s documentation recommends for your generation.
  • Avoid copying huge files directories to non-production environments. Use Stage File Proxy or a similar module to fetch files from production on demand.
  • Watch storage use. Storage is part of your entitlements. Old files, unused media and large original images add up. Review storage regularly and clean up with care.
  • Set upload limits in Drupal for file sizes and types, and block executable file types.
  • Treat files copied from production as sensitive, since they may include private documents.

Digital asset management

Many enterprises store images and brand files in a digital asset management (DAM) system and use them in Drupal through an integration module. The integration may copy assets into Drupal’s file system, or reference them from the DAM’s own delivery network.

When integrating a DAM:

  • Understand where files are served from, because it affects caching, performance and what happens if the DAM integration fails.
  • Keep the integration module updated. Vendors change their APIs, and Acquia’s end-of-life schedule lists retirements and migrations for its own integrations.
  • Control credentials: store API keys in environment variables or a secrets manager, not in configuration exported to Git.
  • Plan for asset expiry: if licensed images expire in the DAM, make sure they are removed or replaced on the site.

Integrations with external systems

The corporate site sends leads to the CRM, the careers site pulls jobs from the HR system, and other sites connect to marketing automation, analytics and payment services. For each integration, manage four things.

1. Environment separation

Non-production environments must talk to test versions of external systems, or to nothing at all. A Stage site sending test leads to the production CRM pollutes sales data. Use environment-specific settings (see the configuration management section) for every endpoint and credential.

2. Credentials

Store API keys and passwords in Cloud Platform environment variables or a secrets service, never in Git or exported configuration. Rotate them on a schedule and when people leave.

3. Outbound IP addresses

Many external systems only accept connections from known IP addresses. Your Acquia environments make outbound connections from specific addresses, which can differ between environments and infrastructure generations, and can change when environments move. Ask Acquia for the correct outbound (egress) addresses for each environment, ask about options for stable or dedicated egress if your integrations require it, and record the addresses in your integration inventory. When Acquia announces infrastructure changes, check whether egress addresses are affected.

4. Failure handling

External systems fail. Decide what your site should do when they do:

  • Queue, do not block. Send data to external systems through Drupal’s queue system where possible, so a slow CRM does not slow down form submissions.
  • Time out quickly. Set short timeouts on HTTP requests, so a hung external service does not tie up PHP processes.
  • Log and alert. Log integration failures and alert someone when they persist.
  • Retry safely. Retry failed queue items without creating duplicates.

Cron and scheduled jobs

Drupal relies on cron to run regular tasks: search indexing, purge queue processing, cleanup and module-specific jobs. On Acquia, you configure scheduled jobs per environment in Cloud Platform to run Drupal cron with Drush on a schedule.

  • Use scheduled jobs, not Drupal’s automated cron. Disable automated cron, which runs cron during page requests, and use a Cloud Platform scheduled job instead.
  • Choose the frequency to match your needs. Many sites run cron every 5 to 15 minutes.
  • Watch the run time. If cron runs longer than its interval, jobs overlap and slow the site.
  • Run heavy tasks separately, as their own scheduled jobs or queue workers, rather than inside cron.

Webocreation Group: Untangling the wires

After the search incident, Arjun set the search index to read-only on all non-production environments, gave Stage its own test index for search testing, and reindexed production overnight. He then built an integration inventory, which revealed that Stage had also been sending test leads to the production CRM, using credentials hardcoded in a custom module. The credentials were rotated, moved to environment variables, and Stage was pointed to the CRM’s sandbox.

The inventory also found that the CRM’s IP allowlist contained an address the site no longer used after its move to Cloud Next. The integration had been working only because the allowlist also contained a broad range added years earlier. Arjun asked Acquia for the correct egress addresses, updated the allowlist with the CRM team, and removed the broad range.

Template: Integration inventory

IntegrationDirectionEnvironments and endpointsCredentials stored inEgress allowlist neededFailure handlingOwner
CRM lead syncOutboundProd: CRM production; Stage and Dev: CRM sandboxEnvironment variablesYes: Acquia egress addresses recordedQueued, retried, alert after 1 hourPlatform team
Acquia SearchOutboundProd: production index; Stage: test index; Dev: read-onlyAcquia-managedNoSearch page shows fallback messagePlatform team
DAMOutboundAll: production DAM, read-onlyEnvironment variablesNoCached images remainWeb team
HR job feedInbound to careersProd: production feed; Stage: test feedEnvironment variablesYesLast good import keptHR web owner

Checklist

  • Make sure only production writes to the production search index, and verify it.
  • Monitor search indexing backlogs and plan reindexing outside peak times.
  • Store private files outside docroot and avoid copying large file directories.
  • Build an integration inventory with endpoints per environment.
  • Move all integration credentials to environment variables or a secrets service.
  • Record Acquia egress addresses and keep partner allowlists accurate.
  • Use queues and short timeouts for calls to external systems.
  • Run cron with scheduled jobs and disable automated cron.

Common traps

  • Stage writing to production indexes or systems. Every endpoint must be environment-specific.
  • Hardcoded credentials. They end up in Git and in every copy of the code.
  • Broad IP allowlists. They hide the fact that your real egress addresses changed.
  • Blocking on external systems. A slow API should never slow down a page request.
  • Reindexing during deployments. Long tasks belong outside deployment hooks.

Drupal performance tuning and scaling

The product launch was scheduled for 9:00 on a Tuesday. Marketing had bought television advertising, sent an email to 400,000 customers, and arranged for the CEO to mention the website in a live interview. Nobody told the web team until the Friday before.

Arjun had four days. The question was simple: could the corporate site handle perhaps twenty times its normal traffic for a few hours? The answer depended on caching, on how efficient the site’s code was, on the subscription’s capacity, and on preparation.

Performance on Acquia is a shared effort. Acquia provides infrastructure that can scale, especially on Cloud Next. You provide an application that uses that infrastructure efficiently. This section covers how to measure performance, find bottlenecks, and prepare for traffic spikes.

A staged readiness plan for a traffic spike, from two weeks out to launch morning (diagram from the Drupal on Acquia: Enterprise Operations Guide series)
A staged readiness plan for a traffic spike, from two weeks out to launch morning.

Where time goes

When a page is slow, the time is usually spent in one of a few places:

WhereTypical causes
Network and edgeNo CDN; large images; too many third-party scripts
Cache missesCookies, sessions, short max-age (see the caching section)
PHP executionInefficient custom code; too many modules; heavy theme preprocessing
DatabaseSlow queries; missing indexes; Views without caching; large tables
External callsSlow APIs called during page requests (see the search and integrations section)
Front endLarge JavaScript bundles; render-blocking resources; layout shifts

Always measure before changing anything. Guessing leads to optimizing the wrong thing.

Measuring performance

Use several viewpoints:

  • Real user data: browser-based measurements of real visitors, such as Core Web Vitals in your analytics or search console.
  • Synthetic tests: page speed tools run against key pages on a schedule, so you see trends.
  • Edge and Varnish analytics: cache hit rates, response times and traffic by path.
  • Application performance monitoring (APM): tools that trace each request through PHP, database queries and external calls, showing exactly where time is spent. Check which APM integrations your Acquia subscription includes or supports, such as New Relic.
  • Cloud Platform metrics: resource usage, request rates and errors for each environment.
  • Drupal logs and slow query logs where available.

Set a baseline for your key pages and journeys, so you can tell when something gets worse.

Common Drupal bottlenecks

Views

Views is powerful and easy to misuse. Common problems include views that load many entities without paging, views that join many tables, and views with caching turned off. Enable Views caching (tag-based caching works well with Drupal’s cache tags), add paging, and check the generated SQL for slow queries.

Entity loading

Custom code that loads entities one at a time in a loop, or loads full entities when only an ID or title is needed, can generate hundreds of queries per page. Load entities in batches and use entity queries efficiently.

Uncached blocks and render arrays

Blocks or render arrays without proper cache metadata are rebuilt on every request (see the caching section). Fix the metadata rather than disabling caching.

Too many modules

Every enabled module adds some overhead, and some add a lot. Review enabled modules regularly and uninstall those you do not use.

Cron and queues

A heavy cron run can slow the whole site. Spread work across queue workers and scheduled jobs, and watch cron duration.

Large database tables

Tables such as logs, caches stored in the database, sessions, webform submissions and revision history grow over time. Configure log retention, use Memcache for cache bins, delete old revisions where policy allows, and archive old submissions.

Scaling on Cloud Next

Cloud Next is designed to scale automatically in response to traffic, within the limits of your subscription. This reduces the need to request capacity changes for normal growth. But automatic scaling has limits:

  • Scaling takes time. A sudden spike from zero to peak in seconds can outpace scaling. The edge and Varnish absorb most of that spike if caching works.
  • Scaling cannot fix inefficient code. If each uncached request takes three seconds of PHP and dozens of database queries, more containers only spread the problem. The database is often the real limit.
  • Subscription limits apply. Acquia’s product guide describes resource limits and how excessive usage is handled. Know your limits before a big event.

On Cloud Classic, capacity is more fixed, and you may need to request temporary increases for large events.

Preparing for a traffic spike

When you know a big event is coming, prepare in stages.

Two weeks or more before:

  1. Tell Acquia. Open a support ticket or contact your account team with the date, expected traffic and the pages that will be hit. Ask whether any preparation is recommended for your subscription.
  2. Identify the pages visitors will land on: the home page, campaign pages, product pages and forms.
  3. Check caching on those pages: max-age, cookies, cache hit rates.
  4. Check forms and integrations that will receive extra load, such as the CRM.

One week before:

  1. Freeze non-essential changes to the site.
  2. Load test, if your subscription and Acquia’s policies allow it. Acquia requires advance notice for load testing on its platform; follow its current policy and coordinate with support. Load test against Stage or a dedicated environment that matches production, not live production during business hours.
  3. Fix the bottlenecks the load test reveals.

The day before and on the day:

  1. Warm caches for landing pages.
  2. Confirm monitoring and alerts are working, and someone is watching.
  3. Have the team on hand, with a clear escalation path to Acquia Support.
  4. Have a fallback ready, such as a simplified static campaign page served from the edge if the site struggles.

Handling bots and crawlers

A large share of traffic to many sites comes from bots: search engine crawlers, AI crawlers, monitoring services, and malicious scrapers. Bots often request uncached pages, such as search results with many filter combinations, which can put heavy load on Drupal.

  • Use bot management at the edge to block or challenge bad bots (see the CDN and edge security section).
  • Rate-limit expensive paths, such as site search and faceted listings.
  • Use robots.txt to guide well-behaved crawlers away from expensive or low-value paths.
  • Watch traffic by user agent in edge analytics to spot new crawlers that cause load.

Webocreation Group: Four days to launch

Arjun opened a support ticket on Friday afternoon. Acquia confirmed the subscription’s limits and recommended checking caching on the landing pages. The campaign page set a cookie through a new marketing tag; it was renamed according to Acquia’s cookie guidance. The product page ran a view without caching that executed 140 queries; enabling tag-based caching cut it to 12. The CRM integration was already queued.

A short load test on Stage, coordinated with Acquia, showed the site handling the expected peak with a cache hit rate above 95 percent on landing pages. On launch morning, traffic peaked at 24 times normal. The edge served most of it, the application scaled comfortably, and the lead form processed 9,000 submissions without a single error. The team spent the morning watching graphs and drinking coffee, which is exactly how a launch should go.

Template: Traffic event readiness plan

ItemDetailStatus
Event and dateProduct launch, Tuesday 9:00
Expected peak20 to 25 times normal traffic for 3 hours
Acquia notifiedSupport ticket number and response
Landing pagesHome, campaign page, two product pages, lead form
Caching checkedMax-age, cookies, hit rate on each landing page
Integrations checkedCRM queue capacity; email service limits
Load testDate, environment, results, Acquia coordination
Change freezeDates
Cache warmingScript or hook ready
MonitoringDashboards and alerts confirmed; who is watching
EscalationAcquia Support contact and ticket urgency
FallbackStatic campaign page at the edge

Checklist

  • Set performance baselines for key pages using real user data and synthetic tests.
  • Use APM where available to find slow code, queries and external calls.
  • Enable caching on Views and fix render arrays without cache metadata.
  • Review enabled modules and large database tables.
  • Learn your subscription’s resource limits and how scaling works on your generation.
  • Ask marketing to tell you about big campaigns early, and use a readiness plan.
  • Coordinate load tests with Acquia in advance.
  • Manage bots at the edge and rate-limit expensive paths.

Common traps

  • Optimizing without measuring. Find the real bottleneck first.
  • Counting on autoscaling to fix slow code. Efficient code and good caching come first.
  • Load testing without notice. Follow Acquia’s policy and coordinate in advance.
  • Learning about campaigns at the last minute. Give marketing an easy way to warn you early.
  • Ignoring bots. Crawlers hitting uncached pages can cause as much load as real visitors.
Drupal on Acquia: Enterprise Operations Guide (full PDF)Every article from this series in one printable PDF.PDF · 560.0 KB
Free download: unlock it in one step

Share this page

or

Mailchimp opens in a new tab to confirm. Unsubscribe any time.

Filed underDrupal
Rupak Nepali
Written byRupak Nepali

Rupak Nepali is a web developer, manage Webocreation website and the author of six books:
Getting Started with OpenCart Module Development (Packt, 2013),
OpenCart Theme and Module Development (Packt, 2015),
OpenCart 4: Dev Guide for Themes & Extensions (2024),
OpenCart 4: User Manual (2025),
Cloudflare for the Enterprise Website (2026) and
The Technical Web Guide for Marketers (2026).
Rupak has built OpenCart stores and extensions since 2010, has published more than 600 tutorials on Webocreation, and shares free OpenCart extensions on GitHub.
Find Rupak on
GitHub | Amazon | LinkedIn | X | YouTube.

Leave a Reply

Your email address will not be published. Required fields are marked *