clarin-eric / component-registry-rest

Component Registry back end
GNU General Public License v3.0
2 stars 1 forks source link

Static registry mirror to provide fallback during downtime #22

Open twagoo opened 8 years ago

twagoo commented 8 years ago

Make a small tool or script that creates a static component registry dump that mimics the actual registry in that it contains the following pages at the expected locations:

For all non-deleted ids. For non-public ids, maybe best to only allow /xsd and /xml.

Also create a notification page at:

It can be used as a drop-in replacement by serving the static files during maintenance to the actual component registry or its host. This can be done either on the same server by reconfiguring the HTTP server, or on another host combined with an update of the DNS entry in case of maintenance that makes the host unavailable (e.g. maintenance at the hosting provider).

We could even perform this at regular intervals and host a fallback 'shadow component registry' that can be switched on when needed (even automatically).

twagoo commented 7 years ago

Possibly an (application agnostic!) solution can be made using a web cache (like squid) that always runs transparently (with limited or no actual caching) in front of the application and can be changed into an 'aggressive caching mode' (with some way of initialising the cache with the URLs of all known expanded specifications and XSDs) during maintenance.

This would work in an even nicer way with a central reverse proxy setup - the caching and proxying would then take place on a different machine so that the service host could even go down during maintenance. A more advanced solution would always keep a regularly updated cache but only serve its contents once the service goes down (for whatever reason).