Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static registry mirror to provide fallback during downtime #22

Open
twagoo opened this issue Aug 8, 2016 · 1 comment
Open

Static registry mirror to provide fallback during downtime #22

twagoo opened this issue Aug 8, 2016 · 1 comment

Comments

@twagoo
Copy link
Member

twagoo commented Aug 8, 2016

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:

  • /rest/registry/profiles
  • /rest/registry/profiles/{id}
  • /rest/registry/profiles/{id}/xml
  • /rest/registry/profiles/{id}/xsd
  • /rest/registry/components
  • /rest/registry/components/{id}
  • /rest/registry/components/{id}/xml
  • /rest/registry/components/{id}/xsd

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

Also create a notification page at:

  • / + /index.html + /index.jsp

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 twagoo changed the title Static registry for maintenance Static registry as maintenance fallback Aug 8, 2016
@twagoo twagoo changed the title Static registry as maintenance fallback Static registry mirror as maintenance fallback Aug 8, 2016
@twagoo twagoo changed the title Static registry mirror as maintenance fallback Static registry mirror to provide fallback during maintenance Aug 8, 2016
@twagoo twagoo changed the title Static registry mirror to provide fallback during maintenance Static registry mirror to provide fallback during downtime Aug 8, 2016
@twagoo
Copy link
Member Author

twagoo commented Jan 16, 2017

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant