Faithful-Resource-Pack / API

A public API for Faithful Resource Pack textures, add-ons and more
https://api.faithfulpack.net
GNU Affero General Public License v3.0
0 stars 0 forks source link

Add basic stat logging setup to API #52

Closed 3vorp closed 1 month ago

3vorp commented 2 months ago

As many of our services expand and use the Faithful API more and more, many endpoints are being accessed thousands of times a day without any optimization or caching. This is obviously undesirable, so Rolf suggested that I log which endpoints are accessed most so we know which endpoints should either be optimized or used by our services less.

This shouldn't reduce the API speed much since I made the entire middleware completely asynchronous and it calls the next() function before making file operations. There may be some concurrency issues but at this scale I'm not too worried by it.