this post was submitted on 02 Apr 2024
73 points (95.1% liked)
Programming
17528 readers
253 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Can we just go back to libmemcached?
What's stopping you?
Oh, I have. We use a mix of libmemcached and local file storage - it works great.
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.