• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Hosting-new.com

Hébergement web, cloud et solutions personnalisées

  • Home
  • About

Hébergement CPanel sur SSD, offre Cloud

Un hébergement professionnel sur serveur Xeon Gold et SSD

Servers

Cloud Hosting vs Cloud Servers: Unveiling the Mysteries of Modern Web Solutions

May 17, 2023 by Admin Leave a Comment

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

As the digital landscape continues to evolve rapidly, the importance of robust, scalable, and secure hosting solutions cannot be overstated. The rise of cloud technology has brought forth transformative solutions,…
Web Hosting Geeks’ Blog

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Filed Under: Web Hosting Tagged With: Cloud, Hosting, Modern, Mysteries, Servers, Solutions, Unveiling

Hosting Multiple Websites on a Dedicated Server: Maximize Your Server’s Potential

May 8, 2023 by Admin Leave a Comment

The power and flexibility of dedicated servers have made them a popular choice for businesses and individuals looking to host websites. One of the key benefits of using a dedicated…
Web Hosting Geeks’ Blog

Filed Under: Web Hosting Tagged With: dedicated, Hosting, Maximize, Multiple, Potential, server, Servers, websites

Introduction to Dedicated Servers: Understanding the Basics and Benefits

May 2, 2023 by Admin Leave a Comment

Dedicated servers are a crucial component of the modern digital landscape, providing businesses and individuals with the resources and power necessary to run their websites, applications, and online services efficiently….
Web Hosting Geeks’ Blog

Filed Under: Web Hosting Tagged With: Basics, Benefits, dedicated, introduction, Servers, Understanding

How Does VPS Hosting Work? A Comprehensive Guide to Virtual Servers

April 19, 2023 by Admin Leave a Comment

Virtual Private Server (VPS) hosting is a popular choice among website owners seeking a balance between the affordability of shared hosting and the power of dedicated hosting. Understanding how VPS…
Web Hosting Geeks’ Blog

Filed Under: Web Hosting Tagged With: comprehensive, Guide, Hosting, Servers, Virtual, work

What is VPS Hosting? A Comprehensive Guide to Virtual Private Servers

April 18, 2023 by Admin Leave a Comment

In the constantly evolving landscape of web hosting, it’s crucial for businesses and individuals to understand the various options available to them. One of the most popular and versatile hosting…
Web Hosting Geeks’ Blog

Filed Under: Web Hosting Tagged With: comprehensive, Guide, Hosting, Private, Servers, Virtual

Web based system to purge multiple Varnish cache servers

January 7, 2020 by Admin Leave a Comment

Hello!

We have been working with varnish for quite a while. And there is quite a lot of documentation out there already for the different methods for purging cache remotely via Curl, the varnish admin tool sets and other related methods.

We deal with varnish in the Amazon Cloud as well as on dedicated servers. In many cases varnish sits in a pool of servers in the web stack before the web services such as Nginx and Apache. Sometimes purging specific cache urls can be cumbersome when you’re dealing with multiple cache servers.

Depending on the CMS you are using, there is some modules / plugins that are available that offer the ability to purge Varnish caches straight from the CMS, such as the Drupal Purge module.

We have decided to put out a secure, web accessible method for purging Varnish cached objects across multiple varnish servers. As always, take the word “secure” with a grain of salt. The recommended way to publish a web accessible method on apache or nginx that gives the end-user the ability to request cache pages be purged would be to take these fundamentals into consideration :

– Make the web accessible page available only to specific source IPs or subnets
– Make the web accessible page password protected with strong passwords and non-standard usernames
– Make the web accessible page fully available via SSL encryption

On the varnish configuration side of things, with security still in mind, you would have to set up the following items in your config :

ACL

Set up an access control list in varnish that only allows specific source IPs to send the PURGE request. Here is an example of one :

# ACL For purging cache
acl purgers {
        "127.0.0.1";
        "192.168.0.1"/24;
}

vcl_recv / vcl_hit / vcl_miss / vcl_pass

This is self explanatory (I hope). Obviously you would be integrating the following logic into your existing varnish configuration.

sub vcl_recv {
        if (req.request == "PURGE") {
                if (!client.ip ~ purgers) {
                        error 405 "Method not allowed";
                }
                return (lookup);
        }
}

sub vcl_hit {
        if (req.request == "PURGE") {
                purge;
                error 200 "Purged";
        }
}
sub vcl_miss {
        if (req.request == "PURGE") {
                purge;
                error 404 "Not in cache";
        }
}
sub vcl_pass {
        if (req.request == "PURGE") {
                error 502 "PURGE on a passed object";
        }
}

The code itself is available on our GitHub Project page. Feel free to contribute and add any additional functionality.

It should be important to note that what differentiates our solution among the existing ones out there is that our script will manipulate the host headers of the Curl request in order to submit the same hostname / url request across the array of varnish servers. That way the identical request can be received by multiple varnish servers with no local host file editing or anything like that.

There is lots of room for input sanity checks, better input logic and other options to perhaps integrate with varnish more intuitively. Remember this is a starting point, but hopefully it is useful for you!

The post Web based system to purge multiple Varnish cache servers appeared first on Managed WordPress Hosting | Managed VPS Hosting | Stack Star.

Managed WordPress Hosting | Managed VPS Hosting | Stack Star

Filed Under: Web Hosting Tagged With: Based, Cache, Multiple, purge, Servers, System, Varnish

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 46
  • Go to Next Page »

Primary Sidebar

Made with love by Hosting-New