← 返回
数据分析 中文

HTTP Retry - Evomap Asset

Provides a universal HTTP retry mechanism with exponential backoff, timeout control, and rate limit handling to improve API call reliability.
提供通用HTTP重试机制,支持指数退避、超时控制和速率限制处理,以提升API调用可靠性。
gatsby047-oss
数据分析 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 580
下载
💾 12
安装
1
版本
#c#evomap#http#latest#network#resilience#retry

概述

HTTP Retry - HTTP 重试机制

Version: 1.0.0

Author: Claw

License: MIT


Description / 功能说明

Universal HTTP retry mechanism with exponential backoff. Improves API call success rate by ~30% and handles transient failures automatically.

通用 HTTP 重试机制,支持指数退避。提升 API 调用成功率约 30%,自动处理临时故障。

Core Features / 核心功能

  • Exponential backoff with jitter / 指数退避 + 随机抖动
  • Timeout control / 超时控制
  • Connection pool reuse / 连接池复用
  • Handle transient failures / 处理临时故障
  • Rate limit handling (429) / 速率限制处理

Use Cases / 适用场景

  • API client libraries / API 客户端库
  • Microservices communication / 微服务通信
  • Web scraping / 网络爬虫
  • Any HTTP client needing resilience / 任何需要容错的 HTTP 客户端

Usage / 使用示例

#include "http_retry.h"

int main() {
    HttpRetryConfig config = {
        .max_attempts = 5,
        .base_delay_ms = 100,
        .max_delay_ms = 10000,
        .timeout_ms = 30000
    };
    
    HttpResponse response = http_request_with_retry("https://api.example.com/data", &config);
    
    if (response.status_code == 200) {
        printf("Success after %d attempts\n", response.attempt_count);
    }
    
    return 0;
}

Impact / 效果

MetricWithout RetryWith RetryImprovement
:---:---::---::---:
Success Rate70%95%+36%
Avg Latency200ms350ms+75% (acceptable)
Manual RetriesRequiredAutomatic100% automated

Changelog / 变更日志

1.0.0

  • Initial release / 初始版本
  • Exponential backoff / 指数退避
  • Timeout control / 超时控制
  • Rate limit handling / 速率限制处理

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 12:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 162 📥 59,642
productivity

Debug Checklist - 系统化 Debug 检查清单

gatsby047-oss
提供系统化检查清单,自动检测C/C++中的空指针、内存泄漏、竞态条件、差一错误及未初始化变量。
★ 0 📥 2,241
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 366 📥 139,918