# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/45wm23q
如何實現限制用戶 1 分鐘內最多請求 1000 次?**
在高併發場景下,如何保護你的服務不被海量請求壓垮?限流器是你的不二之選。本文將帶你使用 Go 語言,實現一個高效的限流器,限制每分鐘內用戶的最大請求次數。限流算法的選擇-------常見的限流算法有很多,例如:計數器算法: 設定一個時間窗口,在窗口內對請求進行計數,超過閾值則拒絕請求。 漏桶算法: 將請求想象成水滴,漏桶以固定速率漏水,溢出則拒絕請求。 令牌桶算法: 以固定速率生成令牌 ⌘ Read more