How far can I go with my notification system before needing Redis or Celery?

0
14
Asked By CuriousCoder99 On

I'm new to backend development and have created a notification system without using Redis or Celery. I see those tools recommended a lot, but I'm not sure why they're necessary, especially for my use case. I completed my own implementation and want to know how much I can rely on it before I might need to switch to Redis or Celery. My setup consists of a React/RTKQ frontend and a Django/DRF/Postgres backend.

In this system, admins choose which user actions should trigger notifications. For example, when a user performs action A, it flags and notifies admins through a central dashboard. There's no need for real-time updates; admins just check the page for notifications when needed.

Here's how I've built it:
1. Admins select which actions trigger notifications, stored in the database.
2. When a user performs a selected action, it makes an API request to the backend.
3. The backend checks if the action should trigger an alert based on admin settings.
4. If so, it creates a notification entry in the database, including related information.
5. Admins can view notifications through a dedicated endpoint that filters relevant alerts.
6. They can resolve these flags by rejecting, requesting changes, or resolving them manually.

I expect low usage, with a maximum of 24,000 potential triggers over a year but likely only around 100 notifications. I'm concerned about how resource-intensive Redis and Celery really are, as my setup runs on a resource-limited VPS.

6 Answers

Answered By DatabaseWhiz123 On

Honestly, given your expected volume, even simple polling from a regular database should do just fine. Redis is a lightweight option and can handle lots of records easily, but it sounds like you're not really at risk of overloading your current system. Start simple and you'll be good to go.

Answered By JustAnotherDev On

You’re totally fine with your current solution! Managing 100 notifications a year is just a matter of querying your database. Remember, those tools are for systems facing real performance problems, not just hypotheticals. You're in a good place!

Answered By GratefulUser On
Answered By SmartDevGuy On

You're in a good spot! Even if you hit 1,000 notifications a year, your current setup should work well without any fancy tools. Redis and Celery are overkill for what you need now. Focus on your system and as you grow or if a need arises, you can always refactor later.

Answered By ThoughtfulViewer On
Answered By TechSavvyDude On

You really don’t need Redis or Celery for your use case. Those tools shine when you have a lot of users needing real-time notifications or a system dealing with heavy loads. For your notification system, what you've built is totally sufficient. Just stick with that approach for now, and if you begin to see issues later on, you can consider making adjustments then.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.