<p style="text-align: center;"><img src="/upload/content/20181224/1545589410221743.png" alt="Redis默认端口号的由来,Redis端口号为啥是6379?" title="Redis默认端口号的由来,Redis端口号为啥是6379?" width="550px"/></p><p>Redis默认端口号的由来,Redis端口号为啥是6379?前几天Redis作者antirez同学在twitter上说将在下一篇博文中向大家解释为什么他选择6379作为默认端口号。而现在这篇博文出炉,在解释了Redis的LRU机制之后,如期向大家解释了采用6379作为默认端口的原因。</p><p>今天来聊一个有意思的话题:Redis 的默认端口为什么是 6379 呢?</p><p>我之前也没有想过为什么Redis的默认端口是6379,估计是随便选的吧。然而今天偶然看到一篇帖子,原来不是随便选的,是有含义的。</p><p style="text-align: center;"><img src="/upload/content/20181224/1545589778985312.jpg" title="Redis默认端口号的由来,Redis端口号为啥是6379?" width="" height="" alt="Redis默认端口号的由来,Redis端口号为啥是6379?"/></p><p>先介绍下redis的作者Salvatore Sanfilippo(Antirez),意大利人,就是下图这位。</p><p style="text-align: center;"><img src="/upload/content/20181224/1545589778114487.jpg" title="Redis默认端口号的由来,Redis端口号为啥是6379?" width="" height="" alt="Redis默认端口号的由来,Redis端口号为啥是6379?"/></p><p>Antirez现在已经40多岁了,依然奋斗在代码一线,为开源社区做贡献。Antirez出生在非英语系国家,所以英语一直是他的短板。他曾经写过一篇博文,《英语伤痛 15 年》,以自己的实际经历鼓励非英语系国家的程序员突破英语障碍。或说回来,在他的另一篇博文《Redis as an LRU cache 》中,写到了为什么选用6379端口:</p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">Appendix: how to remember the Redis port number</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">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.</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">Is it a coincidence that it sounds not random enough? Actually not ;) I selected 6379 because of MERZ, and not the other way around.</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">Everything started with Alessia Merz, an Italian Showgirl (make sure to check some (not safe for work) photo as well).</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">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.</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">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.</span></p><p>文章地址:</p><p>http://oldblog.antirez.com/post/redis-as-LRU-cache.html</p><p>用一张图片来翻译一下,6379 就是这个意思:</p><p style="text-align: center;"><img src="/upload/content/20181224/1545589778742845.jpg" title="Redis默认端口号的由来,Redis端口号为啥是6379?" width="" height="" alt="Redis默认端口号的由来,Redis端口号为啥是6379?"/></p><p>而Merz全名Alessia Merz,是意大利的一位广告女郎,就是下面这位:</p><p style="text-align: center;"><img src="/upload/content/20181224/1545589778286238.jpg" title="Redis默认端口号的由来,Redis端口号为啥是6379?" width="" height="" alt="Redis默认端口号的由来,Redis端口号为啥是6379?"/></p><p>在Antirez看来,这个名字是愚蠢的代名词,所以就选了这个6379。我觉得还是有点侮辱人啊。不过这位姑娘应该也不会关心IT技术圈的事,反而会被广大程序员知道了。</p>