storj/private
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
..
api satellite/console: integrate sessions into satellite UI 2022-06-13 08:02:02 +00:00
apigen {private,satellite}: add Typescript generation to REST API generation 2022-08-18 16:37:48 +00:00
blockchain satellite/{payments/storjscan,satellitedb}: Add storjscan wallet DB 2022-05-24 08:42:02 +00:00
compensation multinode/console: storage usage and total storage usage 2021-06-10 16:01:41 +00:00
crashreportpb all: fix linting issues 2022-03-21 15:26:42 +00:00
cui all: reformat comments as required by gofmt 1.19 2022-08-10 18:24:55 +00:00
currency private/currency: add strictcsv support to microunit 2020-03-31 14:57:04 -06:00
date Fix monthly earning estimation (#4282) 2021-11-17 18:26:21 -05:00
debugging all: fix dots 2020-07-16 14:58:28 +00:00
lifecycle satellite: more detailed goroutine labels 2022-05-11 17:50:55 +00:00
migrate all: fix error naming 2021-04-29 15:38:21 +03:00
multinodeauth {storagenode,multinode/nodes}: use multinodeauth.Secret instead of []byte for APISecret 2022-08-23 11:04:04 +00:00
multinodepb all: fix linting issues 2022-03-21 15:26:42 +00:00
nodeoperator all: fix error naming 2021-04-29 15:38:21 +03:00
post satellite/email: add delimiter to close the last part of Multipart emails 2022-02-01 09:55:29 +00:00
prompt private/prompt: remove dependency to go-prompt 2020-02-25 13:09:41 +02:00
revocation all: fix error naming 2021-04-29 15:38:21 +03:00
server storagenode: accept HTTP calls on public port, listening for monitoring requests 2022-08-26 09:38:09 +00:00
testblobs satellite/audit,storage: increase sleep delay in TestMaxVerifyCount 2021-09-10 15:30:37 +00:00
testmonkit all: reformat comments as required by gofmt 1.19 2022-08-10 18:24:55 +00:00
testplanet testplanet: support snapshot based migration for storagenode 2022-08-22 09:46:27 +00:00
testredis ci: fix lint errors 2021-05-17 13:37:31 +00:00
testrevocation pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
teststorj all: fix dots 2020-07-16 14:58:28 +00:00
testuplink mod: bump uplink 2021-05-06 14:48:36 +00:00
version private/version: document kebabToPascal 2022-03-31 13:52:27 +03:00
web web/ratelimiter: support disabling 2022-06-09 15:33:35 +00:00