共 106 篇文章
深入理解 Redis 事务与原子性
Redis 事务是一组命令的集合,通过 MULTI 和 EXEC 命令来执行。事务中的所有命令都会序列化,按顺序串行执行,不会被其他命令插入。本文深入解析 Redis 事务的特性和原子性问题。
Laravel Redis::throttle 限流组件解析
在调用第三方 API 时,经常会遇到 QPS 限制。如果请求频率超过限制,API 会返回错误。此时我们需要限流 + 重试机制来保护下游服务。
本文详细介绍 Laravel 中 Redis::throttle 的实现原理。需要注意的是:Laravel 的实现实际上是固定窗口计数器,而非标准的令牌桶算法。
本周阅读清单 20191130
Uber 的 Go 指导规范
https://github.com/uber-go/guide/blob/master/style.md使用 JWT 保证服务间通信的安全
https://abekthink.github.io/backend/json-web-token/MySQL 查询对大小写不敏感
https://www.jianshu.com/p/408daf82ac71服务流量限制(漏桶、令牌桶)
https://chai2010.cn/advanced-go-programming-book/ch5-web/ch5-06-ratelimit.html为什么推荐 InnoDB 引擎使用自增主键?
https://blog.csdn.net/zheng0518/article/details/76302167MySQL 唯一性索引与 NULL 字段
https://yemengying.com/2017/05/18/mysql-unique-key-null/
本周阅读清单 20190808
PHP 正则 preg_match 匹配长度限制
https://learnku.com/articles/7193/php-regular-preg-match-matching-length-limit深悉正则(pcre)最大回溯/递归限制
http://www.laruence.com/2010/06/08/1579.htmlRedis 的内存优化
https://cachecloud.github.io/2017/02/16/Redis内存优化Content-Disposition 的 filename 与 filename 区别*
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Content-DispositionRedis Scan 命令原理
https://segmentfault.com/a/1190000018218584Redis 字典的遍历 dictScan 算法
http://www.langdebuqing.com/redis%20notebook/redis源码解读:字典的遍历dictScan.html