how-twitter-uses-redis-to-scale-105tb-ram-39mm-qps-10000-ins

原文见:how-twitter-uses-redis-to-scale-105tb-ram-39mm-qps-10000-ins

原文讲述作者在twitter使用redis进行scale-105tb-ram-39mm-qps-10000-ins的一些经验(其实主要列举了搭建large-scale系统需要考虑的一些情况,这点还是很值得看一下的;也讨论了这种环境下使用redis需要考虑的因素)

  • Why Redis?
  • Hybrid List
  • BTree
  • Cluster Management
  • Data Insight
  • Wish List for Redis

几个好的总结:
(嗯,第六点?)

  1. Scale demands predictability.
    The larger the cluster, the more customers, the more predictable and deterministic you want your service to be. When there’s one customer and there’s a problem you can dig into a problem and it’s intriguing. When you have 70 customers you can’t keep up.

Read More

antirez的抱怨

针对他人twitter上的争论,其实antirez正文写的是很平淡客观的,今天偶然翻看评论,antirez对一位留言者做了回复,这里不难明白作者标题的含义了
Dermot Haughey留言:

1
2
3
4
Always shocked at how rude and dismissive the software community can be.
People really need to abandon their egos in search of cooperation.
Jumping on a prominent member of the open source communtity because you
misunderstood what they said isn't going to 'win' you any points in the longrun

Read More

由一段js正则式想到

今天找JS的json函数,发现一段代码:

1
2
3
4
5
6
7
8
9
parse: function (text) {
try {
return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
text.replace(/"(\\.|[^"\\])*"/g, ''))) &&
eval('(' + text + ')');
} catch (e) {
return false;
}
}

详细的代码可以见这里
应该是很老的代码了,但是真是搞不清这里的含义

/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/

中间 Eaeflnr-u 这一段的意思是?为什么要这样去判断是否是json的格式呢?

Read More

openresty

发现一个不错的nginx扩展(不仅仅是扩展了),openresty.org 有详细的介绍,这里摘录一下:

OpenResty (也称为 ngx_openresty)是一个全功能的 Web 应用服务器,它打包了标准的 Nginx 核心,
很多的常用的第三方模块,以及它们的大多数依赖项。
OpenResty 通过汇聚各种设计精良的 Nginx 模块,
从而将 Nginx 有效的变成一个强大的 Web 应用服务器,
这样, Web 开发人员可以使用 Lua 脚本语言调动 Nginx 支持的各种C以及Lua 模块,
快速构造出足以胜任 10K+ 并发连接响应的超高性能Web 应用系统.

OpenResty 的目标是让你的Web服务直接跑在 Nginx 服务内部,
充分利用 Nginx 的非阻塞 I/O 模型,
不仅仅对 HTTP 客户端请求,甚至于对远程后端诸如
MySQL,PostgreSQL,~Memcaches 以及 ~Redis 等都进行一致的高性能响应.

openresty的主要作者是 agentzh,中文名:章亦春,GitHub Page

Read More