Settings

Theme

You can now directly sync Postgres with Redis

github.com

22 points by vijaymohan1979 8 months ago · 20 comments

Reader

maxmcd 8 months ago

Since db cache consistency is a complex research space with things like https://readyset.io/ and https://www.usenix.org/system/files/conference/nsdi13/nsdi13... it would be great to hear more specifics about what this is giving up in order to sidestep all that complexity.

solatic 8 months ago

Can someone ELI5 where this is going to be valuable?

If you set up Postgres read replicas, make sure your queries are covered by appropriate indexes, and your hot queries are handled by Postgres from RAM anyway - do you really need a separate Redis cache?

I feel like anytime I'm going to pull in Redis for a cache, it's going to be for data that I'm not interested in having guaranteed persistency for, like session tokens, and so it'll be for data that I wouldn't be storing in Postgres anyway?

  • lotharcable 8 months ago

    Probably useful for sharing stuff with services that already have access to redis, but you don't want to add SQL client dependencies for and/or don't want to give access to your database.

    But you want to be able to store/have single source of authority and update them using a SQL database.

    This would then eliminate the need to maintain a separate lambda or cron job or something like that to keep them in sync.

  • vijaymohan1979OP 8 months ago
yohannparis 8 months ago

No Pricing information nor an open-source project. I don't know what to do with this product.

henning 8 months ago

It'd be nice to see documentation of how it works. Is it using a replication channel for Postgres? The write-ahead log? It looks like it does schema introspection and then works off that. How does it handle schema changes? How does this work in scenarios where you have multi-master replication? What's the compatibility with popular Postgres extensions like PostGIS? What happens if the database is rebooted or crashes? Yes I realize the source is there.

hangonhn 8 months ago

Did you really mean to leave your AES key in the code in RedflyEncryptionKeys?

> public const string AesKey = ...

Also, the way AES is used in the code is not good practice. It seems to be using plain AES ( https://learn.microsoft.com/en-us/dotnet/api/system.security... ), which isn't meant to be used bare like that. It needs to be coupled with a digest algorithm to protect the ciphertext. Maybe use AesGcm instead?

  • foxyv 8 months ago

    The reason for this is that AES is not an authenticated algorithm so there is no way to determine if the ciphertext has been modified since encryption. The ciphertext could be modified/corrupted and you wouldn't know.

    Also, AES is deterministic and will encrypt the same data the same way every time. This means if you are encrypting a lot of fields you will be able to do statistical attacks. Using an initialization vector with AES GCM is similar to salting a hash. This way there is no statistical method to determine the contents of the ciphertext.

  • vijaymohan1979OP 8 months ago

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection