Skip to content

Commit

Permalink
Merge pull request #20 from alu234/master
Browse files Browse the repository at this point in the history
update: 2 articles
  • Loading branch information
youngyangyang04 authored Dec 3, 2023
2 parents ee26630 + 33cc5c7 commit e025852
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@

* [SYN队列和ACCEPT队列](./problems/SYN队列和Accept队列.md)

* [SYN队列溢出了怎么办](./problems/SYN队列溢出了怎么办.md)



# 数据库
Expand All @@ -109,6 +111,7 @@
* [数据库日志类型作用](./problems/数据库日志类型作用.md)
* [B TREE 和B+TREE的区别](./problems/BTREE和B+TREE的区别.md)
* [union和join](./problems/union和join.md)
* [Innodb和Myisam的区别](./problems/Innodb和Myisam的区别.md)

# 海量数据处理

Expand Down
19 changes: 19 additions & 0 deletions problems/Innodb和Myisam的区别.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
数据库引擎是用于存储、处理和保护数据的核心服务

1.事务

InnoDB 支持事务,事务安全。Myisam 非事务安全,也不支持事务

2.锁

innoDb 行级锁,myisam 针对表加锁

3.索引

innodb 不支持全文索引,myisam 支持全局索引

4.适用场景

myisam 效率快于 innodb ,适用于小型应用,扩平台支持。大量查询 select

innodb 支持事务,也有 ACID 的特性还有 insert update 对于事务的控制操作
23 changes: 23 additions & 0 deletions problems/SYN队列溢出了怎么办.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
查看 SYN 队列

就是查看处在 SYN_RECV 状态的进程连接个数

```
netstat -natp | grep SYN_RECV | wc -l
```

查看溢出情况

```
netstat -s
```

预防 SYN 攻击

- 增大半连接队列

- 开启 SYN cookies 算法

- 减少 SYN+ACK 重传次数

当服务端受到 SYN 攻击时,就会有大量处于 SYN_REVC 状态的 TCP 连接,处于这个状态的 TCP 会重传 SYN+ACK ,当重传超过次数达到上限后,就会断开连接。那我们减少了重传次数,就会加速断开连接,这里可以联想如果在第三次握手失败了之后的场景

0 comments on commit e025852

Please sign in to comment.