Skip to content

Commit

Permalink
添加库
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomeng79 committed Mar 18, 2019
1 parent 3c1a3dc commit fa4e61f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions 01语言/1go/7常用的包.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
- [websocket](https://github.com/gorilla/websocket) websocket库
- [viper](https://github.com/spf13/viper) 配置文件
- [gg](https://github.com/fogleman/gg) 渲染2D图片
- [canal](https://github.com/alibaba/canal) 阿里巴巴mysql数据库binlog的增量订阅&消费组件


### 区块链
Expand Down
13 changes: 13 additions & 0 deletions 11机器学习/4信息熵和信息增益.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 信息熵和信息增益

[概念](https://www.cnblogs.com/fantasy01/p/4581803.html)

1. 信息
信息是用来消除随机不确定性的东西

2.
熵便是信息的期望值
熵是用来度量不确定性,当熵越大,概率说X=xi的不确定性越大,反之越小,在机器学期中分类中说,熵越大即这个类别的不确定性更大,反之越小

3. 信息增益
信息增益在决策树算法中是用来选择特征的指标,信息增益越大,则这个特征的选择性越好
2 changes: 2 additions & 0 deletions 16架构/000常见设计.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

1. [商品SKU设计](https://blog.csdn.net/wwwdc1012/article/details/71774280/)

2. [Nginx+Varnish 实现动静分离,为服务器分流,降低服务器负载](https://www.cnblogs.com/painsOnline/p/5166889.html)

12 changes: 6 additions & 6 deletions 16架构/4秒杀系统.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

### 思路

1. 将请求拦截在上游
2. 充分利用缓存
1. 将请求拦截在上游,过滤无效请求
2. 充分利用缓存(包含本地缓存)

#### 具体方案

- 客户端层: 按钮置灰,禁止用户重复提交请求;
- 客户端层:JS限制用户在x秒之内只能提交一次请求
- 站点层: 页面缓存,返回同一个页面,同一个用户限流
- 服务层: 请求队列,超量直接返回"已售完"
1. 动静分离(动态数据请求服务器,比如时间),HTTP-CACHE
2. 限流:1. JS限制用户在x秒之内只能提交一次请求 2. 增加答题缓解,达到分流限流 3.同一个userid最大购买个数 4. 达到最大购买数量,直接返回,过滤掉无效请求
3. 隔离:热点数据和服务做隔离,可以人工打标记,智能识别,将热点数据隔离
4.
4 changes: 4 additions & 0 deletions 16架构/5缓存.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@

[一致性哈希算法](../14数据结构和算法/2一致性哈希算法.md)

### HTTP-CACHE

[varnish](http://varnish-cache.org/) 页面缓存


2 changes: 2 additions & 0 deletions 17基础设施/4Gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

2. [kong](https://github.com/Kong/kong) [官网](https://konghq.com)

3. [openresty](http://openresty.org) nginx+lua

#### kong ui

1. [konga](https://github.com/pantsel/konga)
Expand Down

0 comments on commit fa4e61f

Please sign in to comment.