Project

General

Profile

feature request #7725

Implement server availability check

Added by Patrick Plitzner 7 months ago. Updated 7 months ago.

Status:
New
Priority:
New
Category:
cdmserver
Target version:
Start date:
09/06/2018
Due date:
% Done:

0%

Severity:
normal

Description

Split from #5209:

Applications may need to check if the server is available.

These services could be used for the check:

But it might be simpler to just simply ping the server. Maybe HTTP HEAD request is sufficient.

We may also want to have 2 services, one for checking availability of the server (without DB check) and one checking if data can be read from the DB.


Related issues

Related to Edit - bug #5774: cdmserver misses to detect some errors in failed instances New 05/06/2016
Blocks Edit - feature request #7727: Server availability indication in TaxEditor New 09/06/2018
Copied from Edit - feature request #5209: Improve server availability check New 09/08/2015

History

#1 Updated by Patrick Plitzner 7 months ago

#2 Updated by Andreas Kohlbecker 7 months ago

We may also want to have 2 services, one for checking availability of the server (without DB check) and one checking if data can be read from the DB.

Using the same service endpoint, with a HTTP HEAD requests you will check for the availability of the server and the GET will touch the persistend storage since only the GET will return a request body. This is true long as the response header is not using the cdm-erntitiy last changed timestamp as Date: in the header.

HEAD requests are not yet working (the command http is from httpie):

http HEAD http://api.cybertaxonomy.org/cichorieae/classification.json
HTTP/1.1 405 Request method 'HEAD' not supported
Allow: GET
Cache-Control: must-revalidate,no-cache,no-store
Connection: Keep-Alive
Content-Length: 366
Content-Type: text/html; charset=ISO-8859-1
Date: Thu, 06 Sep 2018 08:47:13 GMT
Keep-Alive: timeout=5, max=100
Pragma: no-cache
Server: Jetty(9.2.z-SNAPSHOT)
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block

#3 Updated by Andreas Müller 7 months ago

Andreas Kohlbecker wrote:

Using the same service endpoint, with a HTTP HEAD requests you will check for the availability of the server and the GET will touch the persistend storage since only the GET will return a request body. This is true long as the response header is not using the cdm-erntitiy last changed timestamp as Date: in the header.

Also the data ping does not necessarily need to return data. The result should only indicate if data is accessible or not.

#5 Updated by Andreas Müller 7 months ago

  • Description updated (diff)
  • Category changed from taxeditor to cdmserver
  • Assignee changed from Patrick Plitzner to Andreas Kohlbecker

#6 Updated by Andreas Müller 7 months ago

#7 Updated by Andreas Müller 7 months ago

  • Related to bug #5774: cdmserver misses to detect some errors in failed instances added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)