libp2p / hydra-booster

A DHT Indexer node & Peer Router
Other
86 stars 5 forks source link

Hydra upgrade #132

Open petar opened 3 years ago

petar commented 3 years ago

We've identified a number of weaknesses in the hydra design and implementation, which cause ungraceful failures (worker crashes) and downtimes when utilization spikes. The problem occurred in the window 7/7/2021-7/21/2021.

Problem analysis (theory)

The backend Postgres database can become overloaded under high volume of DHT requests to the hydras. This causes query times to the database to increase. This in turn causes DHT requests to backup in the provider manager loop, which in turn causes the hydra nodes to crash.

Corrective steps

Acceptance criteria

BigLep commented 3 years ago

@petar : thanks for putting this together. A few comments/questions coming to mind:

  1. I'm not saying we need to backfill now, but in future I think it would be ideal to include the data that lead us to our theory.
  2. Do we know why we're crashing now vs. not previously?
  3. What's the impact to Hydra nodes crashing? Does the whole network see impact? Or is our ability to monitor/inspect the network impaired?
  4. Is there anything else architecturally or infra wise we could do that would help here? I'm not saying we should, but for example, would AWS RDS Postgres Aurora help here?

You don't need to answer these questions here. They are the things that came to mind while reading this.