mbg / wai-rate-limit

Rate limiting for Servant and as WAI middleware
MIT License
12 stars 3 forks source link

Add support for SQLite #11

Open ad-si opened 1 year ago

ad-si commented 1 year ago

It would be cool if there was an option to use SQLite instead of Postgres! I think it’s even more fitting since it doesn’t have Postgres’ network overhead.

mbg commented 1 year ago

Hi @ad-si, thanks for the suggestion. There (probably) aren't any technical obstacles to adding a SQLite backend, although I am not really sure how useful that would be considering what SQLite is and isn't good for. If you are in a position where you need rate limiting, I'd assume that you probably also care a lot about concurrency and distributivity (but feel free to convince me otherwise). I can maybe see it being useful for local development, but even then spinning up a Redis instance in some sort of container isn't hard.

So in short, if somebody contributed (or made their own) SQLite backend for this library, that would be great to have in the arsenal if there are people who want it (and I'd probably be happy to merge it if they opened a PR), but I am not going to work on it myself.