EmerisHQ / demeris-backend

Monorepo containing all the Demeris backend code and infrastructure definitions.
GNU Affero General Public License v3.0
8 stars 1 forks source link

Black-box monitoring: Price oracle #190

Open sgerogia opened 3 years ago

sgerogia commented 3 years ago

It is hard for the Price Oracle to self-verify the accuracy of its ticks. Create an external service which will act as a "canary" for stale ticks.

DoD

DeshErBojhaa commented 2 years ago

Using opencensus for collecting service metrics (https://github.com/census-instrumentation/opencensus-go)

ℹ️ Please add/suggest more metrics that you think is important for a good monitoring system.

Scope for MVP

If we have time, and if it's a low hanging fruit, monitor the metrics of the pod (memory, cpu percentage, network etc.)

DeshErBojhaa commented 2 years ago

Blackbox Monitoring of Price Oracle

Host Pros Cons
AWS Lambda 1. Low maintenance, 2. Free tier available, 3. SLA by cloud provider, 4. Triggering alerts are easy via cloud watch 1. One extra infra to manage
Our Kubernetes 1. It's our, so have builtin monitoring, 2. One less infra to manage, We can use same grafana dashboard as price oracle for monitoring this service 1. It's our infra, it it's not being 100% blackbox
tbruyelle commented 2 years ago

If we deploy a new pod responsible for this task, are we sure that it will go through nginx (to detect cache problems) and not connect directly to the price-oracle pod ?

DeshErBojhaa commented 2 years ago

If we deploy a new pod ... are we sure that it will go through nginx (to detect cache problems) ...

Not sure. But since we will query the endpoint exposed by the service, it theoretically should go through nginx. But again not sure.