HTTP/2 优势
> 参考 https://help.aliyun.com/document_detail/65103.html
>
> HTTP/2也被称为HTTP 2.0,相对于HTTP 1.1新增了多路复用、压缩HTTP头、划分请求优先级和服务端推送等特性,解决了在HTTP 1.1中一直存在的问题,优化了请求性能,同时兼容了HTTP 1.1的语义。目前,Chrome、Edge、Safari和Firefox等浏览器已经支持HTTP/2协议。
>
> HTTP/2的优势:
**二进制协议**:相比于HTTP 1.x基于文本的解析,HTTP/2将所有的传输信息分割为更小的消息和帧,并对它们采用二进制格式编码。基于二进制可以使协议有更多的扩展性。例如,引入帧来传输数据和指令。
**多路复用**(MultiPlexing):在HTTP1.x中,我们经常会使用到雪碧图、使用多个域名(域名切片)等方式来优化性能,因为浏览器限制了同一个域名下的(tcp)连接数量,当页面需要请求很多资源的时候,队头阻塞(Head of line blocking)会导致在达到最大请求时,资源需要等待其他资源请求完成后才能继续发送。HTTP2.0中,基于二进制分帧层,HTTP2.0可以在共享TCP连接的基础上同时发送请求和响应,在另一端根据流标识符和首部将他们重新组装起来,通过该技术,可以避免HTTP旧版本的队头阻塞问题,极大提高传输性能。
**Header压缩**(Header compression):HTTP 是一种无状态协议,请求头需带有大量信息,而且每次都要重复发送。HTTP/2采用HPACK格式进行压缩传输,通讯双方各自缓存一份头域索引表,相同的消息头只发送索引号,从而提高效率和速度。
**服务端推送**(Server Push):服务端可以对一个客户端请求发送多个响应,服务端向客户端推送资源无需客户端明确的请求。
> 这个写得不错啊 https://limeii.github.io/2019/06/http1.1-http2/
MySQL 索引优化
> https://zhuanlan.zhihu.com/p/463694360#:~:text=2.%20mysql-,%E7%B4%A2%E5%BC%95%E4%BC%98%E5%8C%96,-%E5%88%9B%E5%BB%BA%E5%90%88%E7%90%86%E7%9A%84
一般禁止全表扫描。
创建合理的索引,关注sql的执行计划。
合理利用索引覆盖、索引下推等特性,尽量避免回表。
有排序需要,尽可能利用索引的有序性,避免filesort。
group by.
关注分页,offset越大,性能越差。
联表查询,小表驱动大表,连接字段要有索引。
32-bit vs 64-bit
Google Bard.
The main difference between 32-bit and 64-bit systems is the size of the registers and the address space. A 32-bit system has registers that can store 32 bits of data, while a 64-bit system has registers that can store 64 bits of data. This means that a 64-bit system can address more memory than a 32-bit system.
The address space is the range of memory addresses that a system can access. A 32-bit system can address up to 4GB of memory, while a 64-bit system can address up to 18 exabytes of memory.
In addition to the difference in size, there are also some other differences between 32-bit and 64-bit systems. For example, 64-bit systems can use larger numbers than 32-bit systems. This can be important for some applications, such as scientific computing.
Another difference is that 64-bit systems can use more than four gigabytes of RAM. This is important for applications that need a lot of memory, such as video games and databases.
Finally, 64-bit systems are generally more secure than 32-bit systems. This is because they can use more sophisticated security features, such as address space layout randomization (ASLR).
In general, 64-bit systems are more powerful and versatile than 32-bit systems. If you are looking for a system that can handle demanding tasks, such as gaming or video editing, then a 64-bit system is the way to go.
Here is a table that summarizes the key differences between 32-bit and 64-bit systems:
Feature | 32-bit | 64-bit
-- | -- | --
Register size | 32 bits | 64 bits
Address space | 4GB | 18 exabytes
Supported numbers | 32-bit integers | 64-bit integers
Maximum RAM | 4GB | 128TB
Security | Less secure | More secure
如何保障 MySQL 和 Redis 的数据一致性?
> [如何保障 MySQL 和 Redis 的数据一致性?](https://mp.weixin.qq.com/s/RL4Bt_UkNcnsBGL_9w37Zg)
HTTP/2 优势
> 参考 https://help.aliyun.com/document_detail/65103.html > > HTTP/2也被称为HTTP 2.0,相对于HTTP 1.1新增了多路复用、压缩HTTP头、划分请求优先级和服务端推送等特性,解决了在HTTP 1.1中一直存在的问题,优化了请求性能,同时兼容了HTTP 1.1的语义。目前,Chrome、Edge、Safari和Firefox等浏览器已经支持HTTP/2协议。 > > HTTP/2的优势: **二进制协议**:相比于HTTP 1.x基于文本的解析,HTTP/2将所有的传输信息分割为更小的消息和帧,并对它们采用二进制格式编码。基于二进制可以使协议有更多的扩展性。例如,引入帧来传输数据和指令。 **多路复用**(MultiPlexing):在HTTP1.x中,我们经常会使用到雪碧图、使用多个域名(域名切片)等方式来优化性能,因为浏览器限制了同一个域名下的(tcp)连接数量,当页面需要请求很多资源的时候,队头阻塞(Head of line blocking)会导致在达到最大请求时,资源需要等待其他资源请求完成后才能继续发送。HTTP2.0中,基于二进制分帧层,HTTP2.0可以在共享TCP连接的基础上同时发送请求和响应,在另一端根据流标识符和首部将他们重新组装起来,通过该技术,可以避免HTTP旧版本的队头阻塞问题,极大提高传输性能。 **Header压缩**(Header compression):HTTP 是一种无状态协议,请求头需带有大量信息,而且每次都要重复发送。HTTP/2采用HPACK格式进行压缩传输,通讯双方各自缓存一份头域索引表,相同的消息头只发送索引号,从而提高效率和速度。 **服务端推送**(Server Push):服务端可以对一个客户端请求发送多个响应,服务端向客户端推送资源无需客户端明确的请求。 > 这个写得不错啊 https://limeii.github.io/2019/06/http1.1-http2/MySQL 索引优化
> https://zhuanlan.zhihu.com/p/463694360#:~:text=2.%20mysql-,%E7%B4%A2%E5%BC%95%E4%BC%98%E5%8C%96,-%E5%88%9B%E5%BB%BA%E5%90%88%E7%90%86%E7%9A%84 一般禁止全表扫描。 创建合理的索引,关注sql的执行计划。 合理利用索引覆盖、索引下推等特性,尽量避免回表。 有排序需要,尽可能利用索引的有序性,避免filesort。 group by. 关注分页,offset越大,性能越差。 联表查询,小表驱动大表,连接字段要有索引。32-bit vs 64-bit
Google Bard. The main difference between 32-bit and 64-bit systems is the size of the registers and the address space. A 32-bit system has registers that can store 32 bits of data, while a 64-bit system has registers that can store 64 bits of data. This means that a 64-bit system can address more memory than a 32-bit system. The address space is the range of memory addresses that a system can access. A 32-bit system can address up to 4GB of memory, while a 64-bit system can address up to 18 exabytes of memory. In addition to the difference in size, there are also some other differences between 32-bit and 64-bit systems. For example, 64-bit systems can use larger numbers than 32-bit systems. This can be important for some applications, such as scientific computing. Another difference is that 64-bit systems can use more than four gigabytes of RAM. This is important for applications that need a lot of memory, such as video games and databases. Finally, 64-bit systems are generally more secure than 32-bit systems. This is because they can use more sophisticated security features, such as address space layout randomization (ASLR). In general, 64-bit systems are more powerful and versatile than 32-bit systems. If you are looking for a system that can handle demanding tasks, such as gaming or video editing, then a 64-bit system is the way to go. Here is a table that summarizes the key differences between 32-bit and 64-bit systems: Feature | 32-bit | 64-bit -- | -- | -- Register size | 32 bits | 64 bits Address space | 4GB | 18 exabytes Supported numbers | 32-bit integers | 64-bit integers Maximum RAM | 4GB | 128TB Security | Less secure | More secure如何保障 MySQL 和 Redis 的数据一致性?
> [如何保障 MySQL 和 Redis 的数据一致性?](https://mp.weixin.qq.com/s/RL4Bt_UkNcnsBGL_9w37Zg)