V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
tes286
V2EX  ›  Amazon Web Services

一个奇怪的 cloudfront 问题

  •  
  •   tes286 · 1 天前 · 906 次点击

    在 cloudflare R2 存了一些文件,但是用天朝网络 cloudflare 有时不甚稳定,忽慢忽快,于是套了一层 cloudfront ,这个貌似略好一点?

    但是 cloudfront 上一个域名出现了很奇怪的问题,在访问一些特定路径时报 502 ,但是同一站点下的其他路径正常

    其中为了支持 cloudflare ,用 lambda@edge 重写了 Host 头,不过我不觉得问题在这

    有谁知道问题吗?谢谢

    正常路径: https://assets.cdn.tes286.site/.eslintrc.cjs

    异常路径: https://assets.cdn.tes286.site/logo.png

    源站: https://assets.tes286.site

    相关截图:

    https://storage.tes286.site/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-09-17%20215904.png

    https://storage.tes286.site/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-09-17%20220301.png

    4 条回复    2024-09-19 10:25:46 +08:00
    xenme
        1
    xenme  
       1 天前 via iPhone
    没记错 edge 无法修改 host header
    allenforrest
        2
    allenforrest  
       1 天前
    问个题外话,CF R2 本身有 CF CDN ,这个在国内访问的效果如何?套了 AWS Cloudfront 后体验差异如何?
    tes286
        3
    tes286  
    OP
       15 小时 26 分钟前   ❤️ 1
    @xenme 能改的,用 lambda@edge 改,具体可以看 https://assets.cdn.tes286.site/cdn-cgi/trace (这个是 cloudflare 提供的)

    @allenforrest 都不太行。 我这(移动)晚上 10 点左右其实都不咋样,不仅是 cdn ,所有出国流量都极慢,包括我的梯子。不过对比起来,cloudfront 略好一点,虽然都不够 1 MBytes/s
    参考: https://storage.tes286.site/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-09-18%20224800.png

    不过白天 cloudfront 上限高一些,多线程甚至能满宽带
    allenforrest
        4
    allenforrest  
       3 小时 52 分钟前
    @tes286 我访问你贴的正常和异常路径都正常
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5745 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 06:17 · PVG 14:17 · LAX 23:17 · JFK 02:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.