Self-hosted redis?
trompx opened this issue · 4 comments
Hello, I was wondering if I could use a self-hosted redis instance?
Also, is the upstash default pay as you go pricing also applies to rate limit, so 0.2$ per 100k commands?
So for example using the slidingWindow algorithm, it would use 4 commands per limit check? I'm afraid in that case the costs would skyrocket, am I missing something?
Hey,
unfortunately our redis service is not available for self hosting.
Rate limiting does not add any extra cost, but you pay for the underlying database.
How much traffic do you forsee? Generally the feedback we received is it's very cheap even for larger projects. Can you share a little more about your work?
Thanks for the fast answer @chronark.
We hit multiple APIs where we have a per request cost, besides they have their own rate limits. We don't have specific burst but aim to have a constant 500 maybe scaling to 2000 rps. We should be able to handle that load on very small redis instances maybe for less than 20$/mo after some tests but were considering a more future proof scalable solution.
Correct me if I am wrong but migrating our load to upstash, let's say for 1000 rps would be approximatly 2b requests per month, would cost around 4000$ using your service? And 16000$ if we'd actually use the slidingWindow algorithm (well it would be more as we use redis for more than rate-limit).
Also could you clarify the following please?
Rate limiting does not add any extra cost
The pay as you go plan is nice to get started but for higher loads we offer fixed cost plans as well.
you can go to the PRO
tier for a fixed price of $280 per month and handles 2k rps. see here
Like I said, using the @upstash/ratelimit
library does not add any cost by itself to your upstash bill. It does however make requests to your database which you will be charged for.
There's also an open source wrapper for redis with upstash compatible rest api.
That way you can use @upstash/ratelimit
with your own redis db
https://github.com/mna/upstashdis