cameri / nostream

A Nostr Relay written in TypeScript
MIT License
745 stars 193 forks source link

[BUG] Do not count /healthz against the api rate limit. #182

Closed ikuradon closed 1 year ago

ikuradon commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

In kubernetes, healthcheck(livenessProbe, startupProbe) access come from semi-fixed in-cluster ip address. And check occurs every 10 seconds by default (= 360 times per hour), the API limitation on the nostream side will be hit and EOF will be returned, resulting in repeated restarts (CrashLoopbackOff).

To Reproduce Steps to reproduce the behavior:

  1. Deploy nostream to kubernetes with livenessProbe config
    ports:
    - name: http
    containerPort: 8008
    protocol: TCP
    livenessProbe:
    httpGet:
    path: /healthz
    port: http
  2. wait about an hour.

Expected behavior A clear and concise description of what you expected to happen.

healthcheck succeeds without problems and the pod continues to run normally.

System (please complete the following information):

antonleviathan commented 1 year ago

Thanks for the report @ikuradon, we'll likely make this update soon. Thanks for the patience.