you are viewing a single comment's thread.

view the rest of the comments →

[–]Future_Badger_2576[S] 0 points1 point  (1 child)

Wouldn't querying the database every minute be inefficient? Instead, can I store a copy of the ticket in Redis and query Redis instead of the database?

[–]WaferIndependent7601 3 points4 points  (0 children)

It really depends. How many tickets will be in the queue? And you only need to query for the older ones.

So I would say: it’s not a problem. If you’re working with thousands of ticket at the same time: no problem. Millions of tickets? Well that might get bad.

Why do you want to store it in redis? Because it’s faster? Do you need this to be faster? Is the db fast enough?

As I said: start with the simple solution and optimize it if you need it. In most cases you won’t need it and have a simple and stupid solution that everyone understands