展示HN:我构建了一个微服务熔断器。
Show HN: I built a fuse box for microservices

原始链接: https://www.openfuse.io

``` npm install @openfuseio/sdk import { OpenfuseCloud } from '@openfuseio/sdk'; const openfuse = new OpenfuseCloud(...); const customer = await openfuse.breaker('stripe').protect( () => stripe.customers.retrieve(customerId) // 正常调用 Stripe ); // 一个断路器。所有服务器同步。 这就是你所需的所有代码。 阈值、恢复和同步由仪表盘管理。 ```

罗德里戈,一名分布式系统工程师,介绍了Openfuse (openfuse.io),一个集中式熔断器系统,旨在解决传统按实例熔断器库(如Resilience4j和Polly)的局限性。他观察到,各个服务实例通常独立地响应故障,导致对故障依赖项的持续负载和级联问题。 Openfuse 聚合了整个服务集群的故障数据,并基于全局视角做出熔断决策。这确保了所有实例同时做出反应,防止了浪费的请求。它通过最少的代码集成,并提供了一个中心仪表板来监控熔断器状态和手动控制熔断器——在维护期间打开它们,或在修复后关闭它们——而无需部署。 定价从免费版本开始,扩展到每月99美元,适用于大多数团队。罗德里戈正在寻求那些具有生产故障场景经验的人的反馈,以进一步完善产品。有人提出了一个问题,关于当*使用它的服务*宕机时,Openfuse的行为。
相关文章

原文
> npm install @openfuseio/sdk
import { OpenfuseCloud } from '@openfuseio/sdk';

const openfuse = new OpenfuseCloud(...);

const customer = await openfuse.breaker('stripe').protect(
  () => stripe.customers.retrieve(customerId) // calls Stripe normally
);

// One breaker. Every server in sync.

That's all the code you need. Thresholds, recovery, and sync are managed from the dashboard.

联系我们 contact @ memedata.com