icoming
V2EX  ›  V2EX

V2ex API 故障率是不是挺高的?

  •  
  •   icoming · Dec 17, 2023 · 2583 views
    This topic created in 897 days ago, the information mentioned may be changed or developed.

    我只用下面 2 个 API ,每天就能收到 6 波"AxiosError: timeout of 3000ms exceeded"

    1. https://www.v2ex.com/api/v2/notifications
    2. https://www.v2ex.com/index.xml

    时间段在早中晚凌晨,分布均匀,不像是服务器繁忙的原因

    并且我做了超时重试处理的,会等待 1 秒后重试,3 次失败后,才会发送错误报告

    我 VPS 和 V2EX 服务器挨着,ping 延时 0.932 ms

    还是我个人的原因吗?

    9 replies    2023-12-18 10:18:21 +08:00
    106npo
        1
    106npo  
       Dec 17, 2023 via Android
    3s 太短
    3IOhG7M0knRu5UlC
        2
    3IOhG7M0knRu5UlC  
       Dec 17, 2023 via Android
    用指数退避,尝试个 10 次再报
    icoming
        3
    icoming  
    OP
       Dec 17, 2023
    @xmumiffy 因为有超时处理,我觉得 3 秒足够了
    icoming
        4
    icoming  
    OP
       Dec 17, 2023
    @GooMS 这个可以有,我加
    bkmi
        5
    bkmi  
       Dec 17, 2023
    3s 太短,网络波动一下就过去了
    julyclyde
        6
    julyclyde  
       Dec 17, 2023
    @GooMS 指数回避这个东西是怎么来的呢?好像很多场景都这么用的
    有什么论文讲述为什么要指数吗?
    akira
        7
    akira  
       Dec 17, 2023
    "等待 1 秒后重试"
    谁家超时重试是 1s 后重试 的啊。。你的超时不会也是 1s 吧。。
    3IOhG7M0knRu5UlC
        8
    3IOhG7M0knRu5UlC  
       Dec 17, 2023 via Android
    @julyclyde 可以看下维基百科的介绍
    MEIerer
        9
    MEIerer  
       Dec 18, 2023
    v2 还有 api ?干嘛用的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3209 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 61ms · UTC 13:02 · PVG 21:02 · LAX 06:02 · JFK 09:02
    ♥ Do have faith in what you're doing.