• abhibeckert@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    7 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.