billfeller

Results 105 issues of billfeller

环境配置: 系统:CentOS release 5.8 (Final) CPU:8核 Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz 内存:32GB 网卡:1000 Mbps C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin>ab.exe -n 1000 - c 10 -C "WAP[revision]=touch" -C "WAP[hd]=1"...

``` 作者:zhanhailiang 日期:2014-12-14 ``` #### 简介 > twemproxy,也叫nutcraker,是twtter开源的Redis和Memcache代理服务器。 #### 功能 - Fast. - Lightweight. - Maintains persistent server connections. - Keeps connection count on the backend caching servers low. -...

issues wiki

``` 作者:zhanhailiang 日期:2014-12-14 ``` Alt+Enter 全屏切换 Ctrl+Inset 复制 Shift+Insert 粘贴 Alt+Insert 粘贴所选择的文本

issues wiki

``` 作者:zhanhailiang 日期:2014-12-13 ``` 参考文章: > [使用Redis bitmap进行活跃用户统计](http://blog.nosqlfan.com/html/3501.html) 本文提供基于Sort Set进行活跃用户统计的PHP版本: https://github.com/billfeller/billfeller.github.io/blob/master/code/UserTj.php

issues wiki

``` 作者:zhanhailiang 日期:2014-12-13 ``` 参考文章: > [用Redis存储好友关系-python版](http://blog.nosqlfan.com/html/576.html?ref=rediszt) 本文提供对应的PHP版本: https://github.com/billfeller/billfeller.github.io/blob/master/code/FriendGraph.php

issues wiki

可以通过使用 ? 查看所有快捷键 ![image](https://cloud.githubusercontent.com/assets/998505/5411814/707d7ce2-8240-11e4-82a0-7b703a418792.png)

issues wiki

``` 作者:zhanhailiang 日期:2014-12-12 ``` ###### 需求背景 通常,缓存逻辑是设置一个过期时间,若缓存失效时,就请求后端读取数据并更新缓存。 但是该方案在高qps的场景下会出现问题——在[缓存失效,请求后端读取数并更新缓存)时间段内,所有的请求都会全部透传到后端,该场景对后端将会产生大量请求。所以我们的目标是希望减少这部分请求数。 ###### 实现方案 - 基于概率的实现机制 - 将cache存储两倍的过期时间 2 \* expire, - 若请求介在[start,start + expire],则只读缓存即可; - 若请求介在(start + expire,start + 2 \* expire),则只透传一定比例(factor=10,表示比例为10%)的请求后端读取数据并更新缓存,其它请求继续使用当前缓存; -...

issues wiki

请求体: ``` GET ajaxapi-getPreheatingProducts.html?query=308698-0-0-0-1-0-2-40&offset=40&limit=40 ``` 其中, ``` query参数通过location.href截断preheating-brand-(.*?).html获取即可; offset参数,略; limit参数,略; ``` 响应体: ``` { "data": [ { "agio": "7.1折", "brand_id": "308698", "cat_id": "10501012", "fav_price": "", "icons": [], "is_warmup": "1", "m_mobile_show":...

issues wiki

``` 作者:zhanhailiang 日期:2014-12-11 ``` 本文主要介绍常见的数据存储方案及相应选型的评估标准的介绍。 ``` Guideline:针对不同应用场景,针对性选择存储方式。 ``` # 1. 数据存储方案 SQL: ``` MySQL 5.5/5.6/MariaDB(对于Dev绝大多数场景下透明); Oracle|MS SQL暂不考虑; ``` NoSQL: ``` Memcached 1.4.21; Redis 2.8; MongoDB 2.6.6; Hbase 0.96/0.98; ``` #2....

issues wiki

请求体: ``` GET http://m.vip.com/ajaxapi-queryAdList.html?s=1418038239498&zoneId=75&f=channel ``` 其中, ``` zoneId参数通过$('#wrapper_banner').data('zoneid');读取; f参数通过$('#wrapper_banner').data('f');读取; ``` 响应体:判断list即可; ``` { "list": [ { "url": "product-292734-39355252.html" } ], "msg": "成功", "ret": 0 } ```

issues wiki