
外部精选
软件工程
#开发者实时流Ghoti:为分布式系统提供轻量协调服务的小型服务器
来源标题:Show HN: Ghoti, a small coordination service for distributed systems
Ghoti 是一个面向分布式系统的轻量协调服务,用一个小型集中式服务器在内存中维护状态,不做持久化。它支持集群级限流等场景,例如 20 个 API 实例共享每秒 100 次请求的上游配额,各实例调用前需从共享令牌桶取令牌。取令牌操作非幂等,读取会消耗令牌,因此不应盲目重试。
Hacker News 最新dankom2026/11/29 · 今天1 分钟阅读
这个来源的 RSS 只提供摘要,下面是原文导语;完整论述请点「打开原文」。
Fleet-wide rate limiting
Twenty API instances, one upstream quota of 100 req/s. Each instance takes tokens from a shared bucket before it calls out, so the limit holds for the fleet instead of per process. tokens_per_req lets an instance take a batch and spend it locally, cutting the round trips.
A read consumes tokens, so it isn't idempotent: don't retry it blindly.
本条为导读摘要,完整论述请以原文为准。
