The reliable way to speed up Drupal with Varnish is to place Varnish as a reverse proxy in front of Drupal, cache anonymous responses for a useful period, and connect Drupal’s cache-tag invalidation to Varnish. Drupal should listen on a separate origin port (commonly 8080 for HTTP and 8443 for HTTPS) while Varnish handles public ports 80 and 443.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
A long time-to-live (TTL) is safe only when edits, menu changes, configuration updates, and other affected pages trigger selective invalidation. The workflow below covers the proxy topology, Drupal settings, Purge modules, cache-tag BAN requests, VCL rules, security, testing, and the failure modes that usually leave a site slow or stale.
As an Amazon Associate I earn from qualifying purchases.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWhat Varnish changes in a Drupal request
Varnish is an HTTP reverse-proxy cache. It sits between visitors and the Drupal web server, receives a request, and decides whether a previously stored response can be returned immediately. If the object is not usable, Varnish forwards the request to Drupal, stores an eligible response, and serves later requests from memory or disk according to its policy.
That removes repeated PHP execution, database work, template rendering, and network waits for cacheable anonymous pages. It does not make every request cacheable: authenticated sessions, personalized output, cart or checkout state, form submissions, and other state-changing operations normally need an explicit bypass.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
| Layer | Responsibility | Typical endpoint |
|---|---|---|
| Visitor | Sends an HTTP or HTTPS request. | Public hostname |
| Varnish | Applies VCL, looks up cached objects, performs HIT/MISS/PASS decisions, and sends invalidation requests. | Ports 80 and 443 |
| Origin web server | Runs Drupal and generates responses when Varnish cannot serve one. | Ports 8080 and 8443, or equivalent private ports |
| Drupal | Sets cache metadata, emits cache tags, and queues invalidation work after content or configuration changes. | Application runtime |
Varnish is a local reverse-proxy layer, not a replacement for Drupal’s render cache, dynamic page cache, database tuning, or an optional geographically distributed CDN. It is most effective when the origin is slow enough that avoiding repeated origin requests matters and when a high proportion of traffic is anonymous and cacheable.
Plan the deployment before changing production
Use a staging environment or a production-like clone first. Changing listener ports, TLS termination, cookies, and cache behavior simultaneously can create redirect loops, accidental exposure of private responses, or a site that appears fast only because it is serving old content.
- Record the current web-server listener, TLS certificate location, Drupal trusted-host configuration, and forwarding-header behavior.
- List public hostnames and decide whether Varnish terminates TLS or passes HTTPS to another proxy. Verify the choice end to end.
- Identify authenticated routes, preview URLs, forms, APIs, personalization cookies, and any response that must never be shared between visitors.
- Choose a trusted network or management address from which purge requests may originate.
- Plan a rollback: keep the origin reachable on its private port and retain the previous web-server listener configuration.
Step 1: Put Varnish in front of Drupal
The origin and Varnish cannot both bind the same public port. Move the origin web server to separate backend ports and have Varnish listen publicly. The common example is HTTP on 80 and HTTPS on 443 at Varnish, with the origin on 8080 and 8443.
- Configure the web server or application server to listen on the selected private ports, such as 8080 and 8443.
- Configure Varnish backends to point to those private addresses and ports.
- Configure Varnish listeners on 80 and 443. If TLS terminates at Varnish, install and renew certificates there; if another load balancer terminates TLS, document how the request reaches Varnish and Drupal.
- Forward the original host and scheme information. Drupal must be able to distinguish the public HTTPS URL from an internal HTTP hop, or it may generate insecure links or redirect repeatedly.
- Open only the public listener to the internet. Restrict the backend port with a firewall or private network rule.
- Check the complete chain with an anonymous page, an authenticated page, a redirect, a static asset, and a form submission before enabling aggressive caching.
Do not assume that a generic Varnish configuration understands Drupal. The VCL must account for host routing, methods, cookies, query strings, static files, response headers, and invalidation requests.
Step 2: Set Drupal’s cache age deliberately
In Drupal, open Configuration > Performance and set Browser and proxy cache maximum age. This value communicates how long browsers and shared proxies may reuse responses. It is not a substitute for Varnish’s VCL policy, and it does not by itself tell Varnish which already-stored objects to remove after an edit.
There is no universal numeric TTL that is correct for every Drupal site. Choose it from the site’s publishing and invalidation behavior:
Free tools Windows power users keep installed
One-click scans. No signup required.
| Site condition | TTL approach | Why |
|---|---|---|
| Frequent publishing but unverified invalidation | Use a conservative cache age while testing. | A shorter lifetime limits how long an unpurged object can remain visible. |
| Reliable cache-tag invalidation and mostly anonymous traffic | Use a long cache age and let tags remove affected objects. | Requests continue to hit Varnish instead of the slower origin, while edits invalidate only related objects. |
| Highly personalized or session-heavy site | Cache only known-public responses; bypass private requests. | Sharing a personalized response is a correctness and privacy failure, not a performance optimization. |
| Static files with fingerprinted or versioned names | Use a long lifetime and replace the URL when content changes. | A new URL avoids ambiguity about which asset is current. |
Changing the Drupal field affects headers generated by Drupal. If a separate proxy, load balancer, or VCL rule overwrites those headers, the effective behavior is the combination of all layers. Verify the actual response from the public hostname.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Step 3: Install Drupal’s Purge integration
Drupal’s Purge framework connects application events to external invalidators. From the Drupal root, install the Purge package and the HTTP purger package with Composer:
composer require drupal/purge drupal/purge_purger_http
Enable the Purge components required by the installed release. A commonly used Drush command is:
drush en purge purge_ui purge_token purge_queue purge_processor_late_runtime purge_processor_cron purge_purger_http -y
Exact submodule machine names are version-sensitive. Before running the command on a particular Drupal release, inspect the modules supplied by the packages with Drush and enable the matching UI, token, queue, late-runtime, cron, and HTTP-tag-header components. Treat a failed enablement as a compatibility issue to resolve, not as a reason to bypass invalidation.
The important roles are:
- UI and token components: expose configuration and replacement tokens needed by the purger.
- Queue and cron processing: retain invalidation work and process it asynchronously.
- Late-runtime processing: performs eligible invalidation work during the current request lifecycle, reducing the interval in which stale content can be served.
- HTTP purger: sends invalidation requests to Varnish.
Enable cron and monitor its queue. A site that records tags but never processes the queue will still serve old objects until their TTL expires.
Step 4: Connect Drupal cache tags to Varnish
Drupal attaches cache-tag metadata to responses and invalidation events. The HTTP purger must turn those tags into a request that Varnish understands. Configure Generic HTTP Purger with the Varnish endpoint, an HTTP method accepted by your VCL (usually BAN or PURGE according to the chosen design), and the header or expression format used to identify affected objects.
The key distinction is URL invalidation versus tag invalidation. A URL purge removes one known URL. A cache-tag ban can remove every cached object carrying a tag, which is important when one node appears on its canonical page, a listing, a taxonomy view, a menu, and a block.
- Open the Purge configuration and select the generic HTTP purger.
- Set the destination to a private Varnish management address, not an unrestricted public endpoint.
- Configure the invalidation method and the header containing Drupal’s tag expression. Drupal commonly emits this metadata as
Purge-Cache-Tags. - Make the expression format identical to the one your VCL ban logic matches. A mismatch silently produces successful-looking requests that invalidate nothing.
- Enable late-runtime processing for immediate work and cron processing for queued work.
- When diagnosing a backlog, process it manually with
drush p-queue-work, then inspect the queue and Varnish logs.
Cache tags make long TTLs practical because an edit removes related objects selectively rather than flushing the entire cache. A full flush remains a useful emergency operation, but using it for every edit destroys hit rate and sends a burst of traffic to Drupal.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Step 5: Build Drupal-aware VCL
VCL is the control plane for Varnish request handling, backend routing, caching, headers, and invalidation. Start from a configuration appropriate to your Varnish version and adapt it to your topology; do not paste a sample without reviewing every condition.
An illustrative skeleton looks like this:
vcl 4.1;
backend default {
.host = "127.0.0.1";
.port = "8080";
}
acl purge_clients {
"127.0.0.1";
# Add only trusted management or application addresses.
}
sub vcl_recv {
if (req.method == "PURGE" || req.method == "BAN") {
if (!client.ip ~ purge_clients) {
return (synth(405, "Not allowed"));
}
# Implement PURGE/BAN handling below for your Varnish version.
}
if (req.method !~ "^(GET|HEAD)$") {
return (pass);
}
# Bypass authorization, session, and other private requests.
# Keep the cookie test specific to your site's session behavior.
# Normalize only query parameters that are known to be tracking noise.
# Preserve parameters that change Drupal output.
return (hash);
}
The snippet is intentionally a design skeleton, not a production policy. Your deployed VCL should address the following decisions explicitly:
Methods and state changes
Only safe, cacheable methods should enter the normal cache path. Pass POST, PUT, PATCH, DELETE, login, logout, form submission, preview, and other state-changing requests to the origin. Never use a broad method rule that allows a state-changing request to populate a shared cache.
Cookies and authentication
Authenticated and personalized requests generally require a pass. Decide which cookies indicate a Drupal session or user-specific output, and test anonymous pages that happen to carry harmless cookies. Bypassing every request with any cookie is safe but may reduce hit rate; bypassing too few cookies risks serving one visitor’s response to another.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Query strings
Query strings can create many cache keys for the same document. Normalize only parameters that are proven not to alter Drupal output, such as known analytics markers. Preserve parameters used by search, filters, pagination, language negotiation, previews, or application logic.
Static assets
CSS, JavaScript, fonts, images, and other immutable or versioned assets can usually follow a simpler cache policy than HTML. Ensure static-file rules do not accidentally cache an access-controlled download, and ensure cookies are not allowed to fragment every asset request unnecessarily.
Host routing and canonical URLs
Route only expected hostnames to the correct backend. Reject or isolate unknown hosts rather than caching their responses under a shared key. Preserve the public host and scheme in forwarded headers so Drupal generates canonical links and redirects correctly.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Response headers
Respect Drupal’s cache-control and private directives unless you have deliberately replaced them. Add diagnostic headers in staging if useful, but remove or restrict internal information in public production responses.
Step 6: Implement and protect BAN or PURGE
Drupal’s Generic HTTP Purger needs an endpoint that Varnish accepts. The VCL must authorize that endpoint before it performs any invalidation. Use an ACL containing only trusted application, proxy, or administration addresses and return an error for every other client.
- Do not expose an unrestricted PURGE or BAN method on the public internet.
- Restrict the management path at the firewall as well as in VCL.
- Log the source address, method, tag expression, and result of each invalidation request.
- Reject malformed or empty expressions rather than interpreting them as a site-wide ban.
- Test both an authorized request and an unauthorized request; the latter must leave cached objects untouched.
For tag invalidation, the VCL ban expression must match the metadata stored on the cached object. Conceptually, it compares the incoming tag expression with an object header containing Drupal’s cache tags. The exact VCL syntax and header handling depend on your Varnish version, so validate the expression in staging and inspect the ban list after a node edit.
Step 7: Verify the complete cache lifecycle
Do not judge the deployment from one browser refresh. Use a repeatable matrix that exercises cache hits, misses, bypasses, and invalidation.
- Request an anonymous page twice. Confirm the first request reaches Drupal and the second can be served by Varnish.
- Request the same page with an authenticated session. Confirm it bypasses shared caching and does not reuse the anonymous object.
- Submit a form and perform another state-changing operation. Confirm the request reaches the origin and no private response is stored.
- Request a CSS or JavaScript asset and verify that the static rule does not interfere with HTML caching.
- Edit a node that appears in more than one place. Confirm Drupal emits the relevant tags, the Purge queue records work, and Varnish removes every affected object.
- Request the edited node and its listing again. Check that the new content is generated once and then cacheable.
- Send a purge request from an unauthorized address. Confirm an error response and no invalidation.
- Repeat the tests over HTTPS and through every public hostname.
Inspect response headers and logs for cache status, object age, backend timing, forwarding headers, and errors. The exact diagnostic header names vary by configuration; what matters is that you can distinguish a HIT, MISS, PASS, backend error, and invalidation event.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →How to choose a TTL without making Drupal stale
Set TTL from the strength of your invalidation guarantee, not from a generic performance rule. A long age with dependable tag invalidation keeps objects available at the edge of the proxy while edits remove only related content. A long age with broken queues or an incorrect BAN expression simply makes stale content persist longer.
Review these questions before increasing the value in Configuration > Performance:
Best Value
- Does every content and configuration change enqueue the expected tags?
- Does late-runtime processing handle urgent changes, and does cron clear delayed work?
- Can the purger reach Varnish over the management network?
- Does the VCL store the tag metadata on objects and match the same syntax during a BAN?
- Are editors able to verify an edit on the public hostname immediately?
- Is there an emergency, authenticated way to flush or ban objects if an integration fails?
If any answer is no, use a shorter, conservative age while repairing the invalidation path. Once tags, queues, authorization, and observability are reliable, extending TTL usually produces more origin relief than repeatedly flushing the entire cache.
Compression: useful, but not a guaranteed percentage
Varnish can gzip content fetched from the backend before delivery, reducing the number of bytes transferred to clients. The benefit depends on response type, client network, compression settings, and whether the response was already compressed. The available official documentation does not establish one universal percentage speed-up, so measure your own site instead of promising a fixed improvement.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Compare representative HTML, CSS, JavaScript, and JSON responses with and without compression. Record transfer size, backend time, total time, and error rate. Avoid compressing formats that are already compressed, and verify that content encoding and cache keys remain correct.
Measure the metrics that explain speed
A faster page is the result of fewer expensive origin requests, not merely a high cache count. Track these metrics over a representative traffic period:
- Cache hit rate: how often Varnish serves an object without contacting Drupal.
- Backend response time: the time Drupal takes when a request is a MISS or PASS.
- Object age: whether objects are reused or constantly replaced.
- Ban and purge activity: the volume, latency, failures, and queue depth of invalidation.
- Origin load: PHP workers, database utilization, request rate, and saturation during cache misses.
- Error rate: 4xx/5xx responses, TLS failures, backend timeouts, and malformed invalidation requests.
Segment metrics by anonymous HTML, authenticated traffic, APIs, and static assets. A strong overall hit rate can conceal a slow uncached search endpoint or a dangerous authenticated-cache mistake.
Troubleshoot the problems readers notice first
Drupal is still slow after Varnish is installed
- Confirm DNS and the public hostname actually reach Varnish, not the origin directly.
- Check that Varnish is listening on 80/443 and the origin is reachable only on its backend ports.
- Look for a cookie, authorization header, query parameter, or VCL rule causing every request to PASS.
- Check whether Drupal sends private or no-cache directives that Varnish correctly honors.
- Compare MISS and HIT timings; a low hit rate may be caused by fragmented query strings or overly broad cookie bypasses.
An edit still shows the old page
- Verify that Drupal generated the expected cache tags for the edited entity and its dependent listings.
- Check whether Purge queued work and whether late-runtime or cron processing ran.
- Confirm the HTTP purger reached the correct Varnish address and received an accepted response.
- Compare the tag expression sent by Drupal with the expression that VCL uses in its ban match.
- Check for another cache layer, browser cache, or CDN serving the old object after Varnish has removed it.
The purge queue keeps growing
- Inspect connectivity, firewall rules, DNS, and TLS validation between Drupal and Varnish.
- Review the purger endpoint and method; a VCL ACL rejection will prevent work from completing.
- Run
drush p-queue-workmanually while observing logs, then fix the underlying failure before relying on cron. - Check for version-sensitive Purge submodules and incompatible package updates.
Users see another user’s content
Immediately bypass affected routes and clear the shared cache. Review every cookie, authorization, preview, and personalization rule. A private-response leak is a configuration incident; do not try to solve it by merely shortening TTL.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsHTTPS redirects loop or Drupal generates HTTP links
Trace the scheme through the TLS terminator, Varnish, origin web server, and Drupal trusted-proxy settings. Correct forwarding headers and canonical-host handling before enabling cache, then purge objects created with the wrong scheme.
Varnish versus adding a CDN
Varnish and a CDN solve different parts of delivery. Varnish commonly provides a controllable reverse-proxy cache close to the origin. A CDN adds geographically distributed edge locations and its own TLS, policy, invalidation, and observability model. If both are used, define which layer owns each cache decision and how a Drupal tag invalidation reaches every layer.
| Decision axis | Local Varnish layer | CDN layer |
|---|---|---|
| Invalidation | Can use VCL BAN/PURGE and Drupal cache tags. | Usually uses the provider’s URL, surrogate-key, or tag mechanism. |
| Geographic coverage | Usually one site or region unless deployed in several locations. | Designed for distributed edge locations. |
| Policy control | VCL offers detailed request and response logic. | Uses the CDN’s policy language and product limits. |
| Operations | You operate software, ports, ACLs, upgrades, and monitoring. | You trade some control for a managed global network and its costs. |
| Cost model | Infrastructure and operations for the proxy host. | Provider charges and possible request, transfer, or invalidation fees. |
There is no neutral speed ranking to apply universally. Compare hit rate, origin latency, invalidation correctness, TLS and geographic requirements, observability, operational complexity, and total cost for your traffic.
Operational checklist
- Varnish owns the public listeners; Drupal’s origin uses separate protected ports.
- TLS termination and forwarding headers produce the correct public scheme and host.
- Drupal’s Browser and proxy cache maximum age reflects a tested invalidation policy.
- Purge, Generic HTTP Purger, queue, late-runtime, and cron components are enabled and compatible with the Drupal release.
- Cache tags reach Varnish through the configured BAN or PURGE request.
- VCL handles methods, cookies, query strings, static assets, host routing, and private responses deliberately.
- Purge endpoints are protected by network controls and a VCL ACL.
- Anonymous, authenticated, state-changing, static, HTTPS, edit, and unauthorized-purge tests pass.
- Hit rate, backend time, object age, queue depth, bans, and errors are monitored.
- A documented emergency flush or ban procedure exists.
Varnish speeds Drupal by serving correct, reusable responses without repeatedly invoking the origin. The durable design is not “cache everything”; it is a protected reverse proxy combined with Drupal cache tags, reliable queue processing, a carefully reviewed VCL, and measurements that prove both speed and freshness.
Recommended Free Tools
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




