Skip to content

Backeds Managment

Monitoring of Backends

The Web Accelerator constantly monitors the operation of the backends, verifying that requests for a specific URL return 200.

When monitoring reports an error, the Web Accelerator stops sending requests to that backend. If there are no other functioning backends, it will continue to respond with cached objects for a certain period after their expiration, and then with a courtesy page. In this way, short outages or maintenance of a cacheable site can remain invisible to visitors.

Normally, Seeweb staff installs a ping.php file on the site, or in a domain created ad hoc in case the backend manages multiple sites. In the case of sites managed with Wordpress, the file also automatically monitors the operation of the database server. In any case, the client can provide a monitoring URL suitable for their needs.

Load Balancing of Backends

The redundancy and scalability of backends are manageable with a load balancing mechanism: the Web Accelerator can forward traffic to multiple backends and ignore non-functioning ones.

Multiple Backends

In the case of complex sites where different parts of the same domain are managed by different backends, the Web Accelerator can handle routing of requests to the appropriate backend based on the URL or other characteristics.

Handling Real Visitor IPs

The backend sees all requests coming from the Web Accelerator's IP and can use the standard header X-Forwarded-For to get the real IP of the visitor.

If the backend uses Apache, then our staff will configure mod_rpaf or mod_remoteip to handle it transparently.

For backends with IIS, you can set:

Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/siteDefaults/logFile/customFields" -name "." -value @{logFieldName='X-Forwarded-For';sourceName='X-Forwarded-For';sourceType='RequestHeader'}

HTTPS Request Handling

The Web Accelerator also acts as a TLS terminator, so requests originally made with HTTPS always arrive at the backend with HTTP and are distinguishable by a X-Forwarded-Proto: https header.

In the default configuration, the Web Accelerator performs the redirect from HTTP to HTTPS by itself, so the backend can be configured simply with HTTP only, without needing to directly manage the redirect logic.

If the CMS wants to distinguish between HTTP and HTTPS requests, it can integrate with this Apache directive, which our staff has usually already installed in the server's general configuration:

SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on

In the case of using nginx, you can configure, for example in /etc/nginx/fastcgi.conf:

fastcgi_param X_FORWARDED_PROTO $http_x_forwarded_proto if_not_empty;

Rarely, some WordPress plugins require inserting code like this directly in wp-config.php:

/* For the management of HTTPS through the Web Accelerator --Seeweb */
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
    $_SERVER['HTTPS'] = 'on';