Answer Engine: How to Set up Rate Limiting in Next.JS with Upstash Redis

Поделиться
HTML-код
  • Опубликовано: 4 сен 2024

Комментарии • 10

  • @DevelopersDigest
    @DevelopersDigest  4 месяца назад

    git.new/answr ⭐

  • @user-vh3vf7hc9s
    @user-vh3vf7hc9s 4 месяца назад +1

    Hello sir once again here on you comments. It's cool that you didn't use vercel's kv to apply rate-limiting. It slides away the stack from vercel dependability. I guess that you will most likely use a key-value database to handle the authentication with next-auth and looking forward introduce the kv redis pipeline to perform actions such as saving the chat history, deletions and more. It would be really nice if once implemented the authentication users had the ability to upload their chats for every user to see based on up or down votes, a views counter, or for the number of forks. The other alternative i have looked into is to use prisma accelerate due to the edge nature of the aplication.

    • @DevelopersDigest
      @DevelopersDigest  4 месяца назад

      I didn't mention this in the video but it is worth mentioning. Upstash also powers the vercel KV databases so this rate limiting approach will work for those that do want to leverage their KV DB on Vercel. So there is flexibility here!
      Also - thank you for your suggestions. I will be demonstrating authentication as well as some other capabilities over time.
      Cheers!

  • @azubermounir9151
    @azubermounir9151 4 месяца назад +1

    boy do i love your videos and this project! if only your voice wasn't smoother than cream cheese on a bagel, i'd stay awake through it!!🔥

  • @rasmic
    @rasmic 4 месяца назад +1

    fire video ❤‍🔥

  • @nomxxn
    @nomxxn Месяц назад +1

    Perfect walkthrough brother, just one question, if we want to limit it per user id or email instead of IP, would I use a function to find the users id/email in the db? Then limit it to that specific user. Reason I ask is because say you’re creating a social media app and multiple users with the same IP want to request a password reset, login etc. I wouldn’t want them to get locked cause one user sent in too many requests. But at the same time protect the app from brute force attacks.

    • @DevelopersDigest
      @DevelopersDigest  Месяц назад +1

      Absolutely and great question. If you have authentication set up, you have a lot more flexibility and granular control on how to manage rate limiting