<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rate-Limiting on Tony老师的博客</title><link>https://blog.tanteng.space/tags/rate-limiting/</link><description>Recent content in Rate-Limiting on Tony老师的博客</description><generator>Hugo</generator><language>zh</language><lastBuildDate>Thu, 02 Jul 2020 10:00:00 +0800</lastBuildDate><atom:link href="https://blog.tanteng.space/tags/rate-limiting/index.xml" rel="self" type="application/rss+xml"/><item><title>Laravel Redis::throttle 限流组件解析</title><link>https://blog.tanteng.space/posts/laravel-token-bucket-rate-limiting/</link><pubDate>Thu, 02 Jul 2020 10:00:00 +0800</pubDate><guid>https://blog.tanteng.space/posts/laravel-token-bucket-rate-limiting/</guid><description>&lt;p>在调用第三方 API 时，经常会遇到 QPS 限制。如果请求频率超过限制，API 会返回错误。此时我们需要限流 + 重试机制来保护下游服务。&lt;/p>
&lt;p>本文详细介绍 Laravel 中 &lt;code>Redis::throttle&lt;/code> 的实现原理。&lt;strong>需要注意的是：Laravel 的实现实际上是固定窗口计数器，而非标准的令牌桶算法。&lt;/strong>&lt;/p></description></item></channel></rss>