Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request][NOWEB] API route or any other way to clear messages from storage #592

Open
butteryreapply2 opened this issue Oct 16, 2024 · 3 comments
Labels

Comments

@butteryreapply2
Copy link

butteryreapply2 commented Oct 16, 2024

We a planning to run a system with lots of active sessions (100+) for a long period of time and potential problem we found is that we can run out of free space.

Describe the solution you'd like

Two solutions are applicable:

  1. TTL for message in storage. For example TTL=3600 - messages that were received hour ago will be deleted.
  2. API route that clear messages with given filter (created_at_gte e.g.).

Describe alternatives you've considered
Completely removing session and login again. But it'll require whole auth flow checks again. Also there is no clear way to understand if particular session using too much space.

patron:PLUS

@devlikepro
Copy link
Contributor

devlikepro commented Oct 17, 2024

Hi!

  1. Do you use MongoDB or files to store data?
  2. How much storage space are we talking about here? In GB if possible

patron:PRO

@devlikepro devlikepro added enhancement New feature or request engine:NOWEB labels Oct 17, 2024
@butteryreapply2
Copy link
Author

butteryreapply2 commented Oct 18, 2024

  1. files
  2. We make some estimates, in one year time there will be around 30gb by our estimates (around 400 sessions).

patron:PLUS

@devlikepro
Copy link
Contributor

devlikepro commented Oct 21, 2024

will be around 30gb by our estimates (around 400 sessions)

That's pretty fine for the number.

Because after few months likely many sessions will get re-paired (due to WhatsApp changes), so it means the sessions won't fully be synced and 30gb nowadays is nothing (compared to dev time and effort)
Unlikely we'll add something like cleanup api soon, but we'll keep eye on it, thank you for the details!

patron:PRO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants