既然无法保证两个服务器上的文件完全一致,是否可以考虑一种 coarse grain 的负载均衡:一段时间内(比如一天或一周)指定任一发行版/项目的镜像只用其中一台服务器服务,一段时间后根据业务量重新指定。当然,一台机器宕机后,全部服务都切换到另一台上。
Regards, 2017-03-03 8:45 GMT-06:00 惠轶群 <[email protected]>: > 如果以上的 workaround 依然不能解决你的问题,欢迎继续反馈。 > > On Fri, Mar 3, 2017, 10:44 PM 惠轶群 <[email protected]> wrote: > >> 这个问题的源头应该是我们在几个月前增加了一台服务器,两台服务器进行负载均衡,以提高镜像站的鲁棒性。然而相对的,两台服务器的文件并不完全一致。通常情况下,你的 >> dns 解析器对于多次请求会返回相同的结果,所以不一致对于用户是不可观测的。但是像8.8.8.8这样的解析器,背后实际上有一个解析器集群, >> 每次为你服务的解析器可能都不同,导致你的请求目标会在两台不一致的服务器间来回摆动,导致了404的产生。 >> >> 由于这个问题可能不能在短时间内解决,一个可能的 workaround 是: >> >> 1. 选择一个会返回固定缓存的dns解析器(可以通过反复dig我们的镜像站,看是否返回相同地址的方式来测试你的dns解析器是否满足这个要求)。 >> 2. 或者在你的机器本地增加dns缓存(比如nscd)。 >> >> On Thu, Mar 2, 2017, 11:08 AM 惠轶群 <[email protected]> wrote: >> >> 这个问题可能是由于我们有两个机器作热备份 而两台机器的同步结果不同导致的 我们正在着手考虑如何解决 感谢你的反馈 >> >> On Thu, Mar 2, 2017, 10:57 AM <[email protected]> wrote: >> >> http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/repodata/ >> 6b1fc537dd00d0d51ddcfa5033fbbcc6333d06e3cedc13b88e5bf92c2875 >> 0d0a-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "TUNA 主邮件列表" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> >> -- > > --- > You received this message because you are subscribed to the Google Groups > "TUNA 主邮件列表" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "TUNA 主邮件列表" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
