this post was submitted on 02 Apr 2024
73 points (95.1% liked)

Programming

17195 readers
326 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] xmunk@sh.itjust.works 12 points 6 months ago (2 children)

Can we just go back to libmemcached?

[–] thebardingreen@lemmy.starlightkel.xyz 7 points 6 months ago (1 children)
[–] xmunk@sh.itjust.works 2 points 6 months ago

Oh, I have. We use a mix of libmemcached and local file storage - it works great.

[–] abhibeckert@lemmy.world 5 points 6 months ago* (last edited 6 months ago)

The big difference is Memcached is multi-threaded, while Redis is single threaded.

That makes Redis more efficient - it doesn't have to waste time with locks and assuming the server isn't overloaded any individual operation should be faster in Redis. Potentially a lot faster.

But obviously by sharing the load across threads as Memcached does, and that cant theoretically allow higher throughput under high load... if your task is suited to multithreading and doesn't involve a shedload of contested locks.

Which one is a better choice will depend on your task. I'd argue don't limit yourself to either one, consider both, pick the one that aligns best with your needs.