kwartzlab / kos-base

KwartzlabOS
4 stars 1 forks source link

Serve the active user count publicly #17

Closed IanEdington closed 10 months ago

IanEdington commented 11 months ago

The request was made to publish the active user count for the smirrl flip counters and our https://spaceapi.io listing.

This has not been approved by the board, so not sure if this needs approval

fixes #14

IanEdington commented 11 months ago

I thought about throwing caching on here since it could be hit a lot if used in a bot, but I don't see it anywhere else in the app. I worry about adding it and having something explode.

azend commented 11 months ago

Meh. We can add rate limiting and caching to the production environment via a CDN service if it becomes a problem.

azend commented 11 months ago

If we want to add it in the future, Laravel supports rate limiting natively. https://laravel.com/docs/9.x/rate-limiting

IanEdington commented 11 months ago

I had a version using laravel's built in caching, but decided to revert (use Illuminate\Support\Facades\Cache;) I'm less worried about bad actors as I am about accidental loan from a well intentioned user. If someone wanted to it doesn't seem like it would be hard to DOS us

I'll merge and deploy this on the 28th once I'm back from traveling