storj/storagenode
Márton Elek 7e71986493 storagenode: accept HTTP calls on public port, listening for monitoring requests
Today each storagenode should have a port which is opened for the internet, and handles DRPC protocol calls.

When we do a HTTP call on the DRPC endpoint, it hangs until a timeout.

This patch changes the behavior: the main DRPC port of the storagenodes can accept HTTP requests and can be used to monitor the status of the node:

 * if returns with HTTP 200 only if the storagnode is healthy (not suspended / disqualified + online score > 0.9)
 * it CAN include information about the current status (per satellite). It's opt-in, you should configure it so.

In this way it becomes extremely easy to monitor storagenodes with external uptime services.

Note: this patch exposes some information which was not easily available before (especially the node status, and used satellites). I think it should be acceptable:

 * Until having more community satellites, all storagenodes are connected to the main Storj satellites.
 * With community satellites, it's good thing to have more transparency (easy way to check who is connected to which satellites)

The implementation is based on this line:

```
http.Serve(NewPrefixedListener([]byte("GET / HT"), publicMux.Route("GET / HT")), p.public.http)
```

This line answers to the TCP requests with `GET / HT...` (GET HTTP request to the route), but puts back the removed prefix.

Change-Id: I3700c7e24524850825ecdf75a4bcc3b4afcb3a74
2022-08-26 09:38:09 +00:00
..
apikeys multinode/payouts: estimated payouts added 2021-05-11 11:33:32 +00:00
bandwidth storagenode: add doc.go files for sno packages 2021-09-29 08:24:56 +00:00
collector error handling in heldamount cash and collector delete fixed 2020-07-22 12:26:13 +00:00
console storagenode/storageusage: add interval_end_time, rename interval_start to timestamp 2022-08-10 01:03:00 +00:00
contact storagenode: check if QUIC is properly configured 2022-01-20 12:04:04 +00:00
gracefulexit storagenode/gracefulexit: remove unused interface 2022-08-04 11:26:14 +03:00
healthcheck storagenode: accept HTTP calls on public port, listening for monitoring requests 2022-08-26 09:38:09 +00:00
inspector storagenode: add doc.go files for sno packages 2021-09-29 08:24:56 +00:00
internalpb all: fix linting issues 2022-03-21 15:26:42 +00:00
monitor storagenode: add doc.go files for sno packages 2021-09-29 08:24:56 +00:00
multinode storagenode/storageusage: add interval_end_time, rename interval_start to timestamp 2022-08-10 01:03:00 +00:00
nodestats storagenode/nodestats: retrieve storage usage starting from last day of previous month 2022-08-10 01:37:02 +00:00
notifications storagenode/console/consoleapi: use fixed time.Now() 2022-07-01 12:36:01 +03:00
operator storagenode: wallet features 2021-03-24 09:08:36 +00:00
orders storagenode: add doc.go files for sno packages 2021-09-29 08:24:56 +00:00
payouts storagenode/console/consoleapi: use fixed time.Now() 2022-07-01 12:36:01 +03:00
pieces storagenode/satellite: support different piece hash algorithms 2022-08-23 18:15:06 +00:00
piecestore storagenode/satellite: support different piece hash algorithms 2022-08-23 18:15:06 +00:00
piecetransfer mod: bump uplink 2021-05-06 14:48:36 +00:00
preflight storagenode/satellites: address added, caching satellite's addresses from trust 2021-07-08 15:38:23 +00:00
pricing all: golangci-lint v1.33.0 fixes (#3985) 2020-12-05 17:01:42 +01:00
reputation storagenode/reputation: clarify wording on suspension notification (#4921) 2022-06-20 22:07:12 +02:00
retain storagenode/satellite: support different piece hash algorithms 2022-08-23 18:15:06 +00:00
satellites Revert "storagenode/payouts: historical payouts use satellitesDB instead of trustPool" 2021-08-02 13:55:21 +03:00
storagenodedb storagenode/storagenodedb: fix null at_rest_total values for storage usage 2022-08-23 12:56:28 +00:00
storageusage storagenode/storagenodedb: fix null at_rest_total values for storage usage 2022-08-23 12:56:28 +00:00
trust all: reformat comments as required by gofmt 1.19 2022-08-10 18:24:55 +00:00
version storagenode/suspensions: added offline-suspension notificatio chore + tests 2020-10-29 19:44:22 +02:00
peer.go storagenode: accept HTTP calls on public port, listening for monitoring requests 2022-08-26 09:38:09 +00:00