6 ms·
Do you need oranges? Apples have seeds, skin, and grow on trees. Redis has many niches where it is more suitable than a database. In particular, the low latenc
by noident 2y ago
Do you need oranges? Apples have seeds, skin, and grow on trees.
Redis has many niches where it is more suitable than a database. In particular, the low latency and simple concurrency model make it a perfect choice for building shared token buckets, for example. For simple operations that need to be executed many times at low latency, SQL is usually not the best choice. And sometimes, you really just need K/V and don't want to deal with schema migrations, DBA chores, debugging auto vacuum...
>Advisory locks allow you to leverage the same locking engine PostgreSQL uses internally for your own application-defined purposes.
That is like telling me that I can get across the river in a nuclear submarine instead of walking over the footbridge. PostgreSQL locks cause me plenty of headaches already without my application logic being dependent on them.
- Tostino 2y agoDisagree. If you need a global locking mechanism that all of your back ends can agree on without setting up an additional service, advisory locks are a totally valid use case. All of your back ends already have access to the DB, why bring in another whole service for just the locking that is required to implement some small thing in your giant SaaS product? Just lean on PG and you can go really far.