The Web Accelerator is a custom load-balancer with a built-in cache system powered by Varnish, created by Gandi for its Hosting platforms. We use it to manage all the requests on Simple Hosting, achieving low latencies and fast content delivery. You can use it yourself on the IaaS platform to cache and/or load-balance requests between multiple servers to handle more concurrent visitors.
A Web Accelerator is used to minimize the response time of your website and optimize the flow management of multiple simultaneous connections.
How does it work?
This has the effect of speeding up the response and load time for all website visitors. The accelerator is located ahead of one or multiple web servers, and will take charge of the HTTP requests usually sent to the web server(s). Once requested and loaded in the cache, data is remembered and can be retrieved with greater speed when requested a second time.
The direct benefits are shorter resolution times and a better distribution of your resources: while your cache manages the recurring requests, your server´s capacity is fully available for more critical tasks while the cached objects haven't expired. You can also use more than one server to handle the requests, allowing you to scale horizontally.
You can also easily use a SSL certificate with your Web Accelerator, to encrypt and secure exchanges with your website. Hardly any additional configuration is necessary on your end. All you need to do is to adjust a few settings on your Gandi interface.
Another interesting feature of the Web Accelerator is it's ability to distribute the traffic load across multiple servers (this is also called a load balancer configuration). As the name implies, the Web Accelerator works only with HTTP, so only web traffic can be balanced with this feature. It is nonetheless quite useful, and can be configured with a few clicks. Changes take effect almost immediately (your zone file remain unchanged, so there is no need to wait for DNS propagation time).
You have the choice between two load balancer algorithms:
It is also possible to add a Healthcheck sensor, to check the availablility of each web server. If a server is no longer responding, the Web Accelerator will stop sending requests to it. This adds redundancy to the site.
The creation is pretty simple: Go to the section called “Servers” in your Gandi interface and click on “Web Accelerator”. Only two pieces of information are required: the name and the location. The accelerator needs to be in the same data center as the servers it connects to.
You can declare an address on a Web Accelerator directly on your Web Accelerator administration page: click on “Add an address”. Enter the website address and click on “Submit”.
If your domain is registered with Gandi and you use Gandi's DNS, then you will have to opportunity to request automatic adjustment of your zone file during the new address creation process.
In the event that your domain is not registered with Gandi, or if you do not use Gandi's DNS, you will need to add a TXT record in your zone file or link a text file to the concerned address.
You will be supplied with the necessary TXT record in your Gandi interface.
If you would like to use an SSL certificate for a declared address, click on the padlock icon located on the right hand side of the virtual host. Fill in your private key and add the certificate. Do not forget to validate the operation.
You can see a list of supported certificates for Simple hosting on this page.
Once you have associated the address(es) to the Web Accelerator, set up the web servers, which will host your websites. On the administration page of the Web Accelerator go to “Network Interfaces” and click on “Add a network interface”. Chose the right server from the dropdown list and indicate the port as shown below :
Feel free to chose between the two available load balancer algorithms and modify your set up to accommodate your needs as often as you wish.
The feature called “health-check” helps you to check the status of your web servers with HTTP. You can use this feature to stop sending requests to servers that are down for maintenance or due to failures. Once fixed, requests are automatically dispatched to the server(s) again.
Here are the parameters necessary for configuring a health-check sensor:
If, for example, you set up a trigger window of 5 and a threshold value of 4, then the server will appear as available only if it responds positively to 4 requests out of 5.
To learn more about how to setup and test caching for your website or application, please refer to the article dedicated to the Web Accelerator's Varnish cache system .
It is possible to use GeoIP on Gandi Simple Hosting instances, by recovering the value 'X-Country-Code' of the HTTP headers .
The value is returned in the form 'FR', 'EN', 'US', 'GB', etc. defined by the ISO norm 3166. You can find the complete list of country codes on the official website https://www.iso.org/obp/ui/
The country code is returned depending on the IP address of the visitor; both IPv4 and IPv6 addresses are supported.
This feature is useful for example in the event that you want to have a website in several languages, where the language is automatically displayed depending on the county of the visitor.
WebSocket support is now available in Alpha testing stage in the FR-SD2 (Paris, France) datacenter.
Learn more and follow a detailed example in the WebSocket on the Web Accelerator tutorial.
If you have configured a firewall on your server, you must authorize the IP range 10.0.0.0/8 to be able to access your server. This is because the web accelerators send requests from IP addresses in this range, and so if your server does not accept them, then the web pages will not be able to be sent to the visitors via the accelerator.