Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

负载均衡不生效 #7801

Open
4 tasks done
AceCandy opened this issue Jan 9, 2025 · 8 comments
Open
4 tasks done

负载均衡不生效 #7801

AceCandy opened this issue Jan 9, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@AceCandy
Copy link

AceCandy commented Jan 9, 2025

Please make sure of the following things

  • I have read the documentation.
    我已经阅读了文档

  • I'm sure there are no duplicate issues or discussions.
    我确定没有重复的issue或讨论。

  • I'm sure it's due to AList and not something else(such as Network ,Dependencies or Operational).
    我确定是AList的问题,而不是其他原因(例如网络依赖操作)。

  • I'm sure this issue is not fixed in the latest version.
    我确定这个问题在最新版本中没有被修复。

AList Version / AList 版本

v3.41.0

Driver used / 使用的存储驱动

alistV3

Describe the bug / 问题描述

使用了多个AlistV3存储进行负载均衡,主页没有问题只显示了一个,但是实际请求发现都是打到一台存储上,在Alist主页上手动刷新之后,获取到的存储对应链接才有变化。但是变化到另一台存储服务器后又只能手动刷新才继续变化。

Reproduction / 复现链接

image

Config / 配置

image 配置没问题,主页只展示了pt一个路径

Logs / 日志

No response

@AceCandy AceCandy added the bug Something isn't working label Jan 9, 2025
@pongfcnkl
Copy link

pongfcnkl commented Jan 9, 2025

因为这玩意只是第一台坏了会自动切到第二台
不是说每个驱动的存储都会请求

@AceCandy
Copy link
Author

AceCandy commented Jan 9, 2025

因为这玩意只是第一台坏了会自动切到第二台 不是说每个驱动的存储都会请求

那还叫什么负载均衡,叫主备得了,我理解一开始这个应该能支持多个轮询负载的吧

@xrgzs
Copy link
Contributor

xrgzs commented Jan 18, 2025

这个负载均衡是有用的,要实现主备的话用“别名”。

负载均衡轮询的需求是可以实现的,本人就在用,配合 Aria2 甚至可以实现同时从多个网盘下载同一个文件。

你的配置有问题,给第一个的名字改成 /pt,第二个 /pt.balance1。之前也是踩过坑。

如果不行的话,检查一下是否有反向代理+缓存,注意不要缓存302。

@AceCandy
Copy link
Author

这个负载均衡是有用的,要实现主备的话用“别名”。

负载均衡轮询的需求是可以实现的,本人就在用,配合 Aria2 甚至可以实现同时从多个网盘下载同一个文件。

你的配置有问题,给第一个的名字改成 /pt,第二个 /pt.balance1。之前也是踩过坑。

如果不行的话,检查一下是否有反向代理+缓存,注意不要缓存302。

什么意思balance后面不是随便接吗,第一个肯定是/pt,后面的命名必须是balance1、2这种?我balance-nc1、nc2不行?

@xrgzs
Copy link
Contributor

xrgzs commented Jan 20, 2025

请问你挂了几个和 /pt 有关的 AlistV3 ?

@AceCandy
Copy link
Author

请问你挂了几个和 /pt 有关的 AlistV3 ?

当然是3个 有个/pt没有截图出来

@xrgzs
Copy link
Contributor

xrgzs commented Jan 20, 2025

请详细描述一下你的部署结构。总共有个Alist实例?是否存在“套娃”?

flowchart TD
    A[Browser] -->|nginx| B(Alist0)
    B --> C{balance}
    C --> D(/pt) -->|AlistV3| G(Alist1)
    C --> E(/pt.balance1) -->|AlistV3| H(Alist2)
    C --> F(/pt.balance2) -->|AlistV3| I(Alist3)
Loading

像下面这种是不行的。

flowchart TD
    A[Browser] -->|nginx| B(Alist0)
    B -->|AlistV3| J(Alist1)--> C{balance}
    C --> D(/pt) -->|AlistV3| G(Alist2)
    C --> E(/pt.balance1) -->|AlistV3| H(Alist3)
    C --> F(/pt.balance2) -->|AlistV3| I(Alist4)
Loading

@AceCandy
Copy link
Author

请详细描述一下你的部署结构。总共有个Alist实例?是否存在“套娃”?

像下面这种是不行的。

佬的图画的真棒,我就是正常的第一种,感觉架构应该没问题,但是使用curl -I 实测发现一直只返回了同一个Location链接。你这边的也用curl -I试过吗,每次能不同么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants