Get the latest tech news

Unlink vs. DEL – A deep dive into how it works internally in Redis


A couple of days back, I found myself debating the differences between Redis' `UNLINK` and `DEL` commands with my friend Sarthak in a social media comment section. An interesting take, I come across that majority of the people seemed to believe is "`DEL` is a blocking command. while `UNLINK` is non-blocking - so `UNLINK` is better". It's somewhat true - but I don't fully agree with this characterisation. Here are my thoughts.

A couple of days back, I found myself debating the differences between Redis' UNLINK and DEL commands with my friend Sarthak in a social media comment section. As an engineer, it's my moral duty to unnecessarily dive into the rabbit hole and dig into the Redis codebase to see the actual implementation. Fun fact - In redis 6.0, a new configuration lazyfree-lazy-user-del was introduced - so if this is set to true, your DEL command runs like UNLINK.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of deep dive

deep dive

Photo of redis

redis

Photo of DEL

DEL

Related news:

News photo

Kronotop: Redis-compatible, transactional document store backed by FoundationDB

News photo

A Deep Dive into JVM Start Up

News photo

A Deep Dive into Working with Siri and ChatGPT, Together