rajnandan1 / kener

Kener is a Modern Self hosted Status Page, batteries included
https://kener.ing/
MIT License
2.2k stars 83 forks source link

reading the per minute json data is too slow #50

Closed rayjanoka closed 4 months ago

rayjanoka commented 5 months ago

Describe the bug hey, love the site! But my site is taking 8+ seconds to respond now that we have 20+ days across 5 monitors.

Expected behavior reasonable response time for webpage is <1 second

Additional context Could we summarize the json files into something that is faster to read on page load? Perhaps a separate json file that has pre-computed the per day counts for UP/DOWN/DEGRADED so it doesn't need to count every minute on every page load? That should be a lot faster. Once we hit 90 days that'll be 60 * 24 * 90 = 130k data points per monitor, and 130k * 5 monitors = 650k datapoints to process on every page load.

thanks!

rajnandan1 commented 4 months ago

Hey @rayjanoka was AFK for a week, That is a good suggestion, let me try it

rajnandan1 commented 4 months ago

Having said that If you look at this site https://statuspage.cashfree.com/category-Payment%20Gateway%20APIs it has lot of monitors but loads under 1 sec

What is your server configuration?

Do you have the latest pull?

rajnandan1 commented 4 months ago

It is done in the last code push

rajnandan1 commented 4 months ago

Please let me know what is the new load time now

rayjanoka commented 4 months ago

I do have some questionable hacks, hehe. but this is much better!!!

image

I'm going to create 2 or 3 more tickets so you can see if you are interested implement them properly. thank you!! 🚀