TwiN / gatus

⛑ Automated developer-oriented status page
https://gatus.io
Apache License 2.0
5.77k stars 396 forks source link

1 year uptime badge #714

Open vasili439 opened 3 months ago

vasili439 commented 3 months ago

Describe the feature request

It's nice to have 1 year uptime badge with 6-7 nines accuracy

Why do you personally want this feature to be implemented?

Reports for CTO and other managers

How long have you been using this project?

2+ years

Additional information

No response

TwiN commented 3 months ago

It's not that I'm against the idea, but with the way uptime retention is currently implemented, this would imply having to store 8760 rows per endpoint instead of 240.

For 50 endpoints, that'd be a total of 438k rows, which I don't think is acceptable, so persistence for uptime would have to be redesigned.

vasili439 commented 3 months ago

is it just matter of DB and PV size? May it could be implemented as an option?

TwiN commented 3 months ago

It's also a matter of performance.

There are some users configuring a single Gatus instance with as much as 3500 endpoints - that'd amount to 3500 x 24 x 365 = 30,660,000 rows with the current implementation, which would be insanely slow for DBs. Not that I think Gatus should be used with 3500 endpoints configured, but even as little as 20 endpoints is 175k rows.

The way it works right now is that there is one row for each hour, and each row has endpoint_id, hour_unix_timestamp, total_executions, successful_executions and total_response_time.

This was acceptable for persistence of 1h, 24h and 7d, but anything further than that would require a more efficient design.

vasili439 commented 3 months ago

may be DB rows could be aggregated after 1 month of detailed stat?