Redis 的預設埠為啥是 6379 ?
今天來聊一個有意思的話題:Redis 的預設埠為什麼是 6379 呢?
我之前也沒有想過為什麼Redis的預設埠是6379,估計是隨便選的吧。然而今天偶然看到一篇帖子,原來不是隨便選的,是有含義的。
先介紹下redis的作者Salvatore Sanfilippo(Antirez),義大利人,就是下圖這位。
Antirez現在已經40多歲了,依然奮鬥在程式碼一線,為開源社群做貢獻。Antirez出生在非英語系國家,所以英語一直是他的短板。他曾經寫過一篇博文,《英語傷痛 15 年》,以自己的實際經歷鼓勵非英語系國家的程式員突破英語障礙。或說回來,在他的另一篇博文《Redis as an LRU cache 》中,寫到了為什麼選用6379埠:
Appendix: how to remember the Redis port number
Today on Twitter I saw a tweet related to the ability to remember the Redis port number. There is a trick, the Redis port number, 6379, is MERZ at the phone keyboard.
Is it a coincidence that it sounds not random enough? Actually not ;) I selected 6379 because of MERZ, and not the other way around.
Everything started with Alessia Merz, an Italian Showgirl (make sure to check some (not safe for work) photo as well).
I and my friends are used to create our own slang, that is evolving since... 20 or 25 years. Well one adjective that we use consistently since 10 years is "merz", but the meaning of the word changed so much in the course of the time.
Initially it started because we were really delighted by the stupidity of the sentences that the showgirl was able to state in the italian TV. So we started using "MERZ" when something was... stupid. "Hey, that's merz!". And so forth. But then with some time the meaning shifted in something stupid as pointless, but with very technical value, or with an impressive amount of skills and patience and work involved, but still... stupid.
文章地址:
ofollow,noindex" target="_blank">http://oldblog.antirez.com/post/redis-as-LRU-cache.html
用一張圖片來翻譯一下,6379 就是這個意思:
而Merz全名Alessia Merz,是義大利的一位廣告女郎,就是下面這位:
在Antirez看來,這個名字是愚蠢的代名詞,所以就選了這個6379。我覺得還是有點侮辱人啊。不過這位姑娘應該也不會關心IT技術圈的事,反而會被廣大程式設計師知道了。