-
Notifications
You must be signed in to change notification settings - Fork 1.1k
如何精细控制缓存 #1999
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
Comments
domain-rules 可以指定 -no-cache (需要41.0.16或更高版本 指定上游的结果不缓存,逻辑上有点难。因为上游是并发查询的,缓存是多个上游结果的合并 |
domain-rules只能指定域名吧,fakeip是基于ip段的规则 |
我的配置,现在默认是返回fakeip,domain-rules是针对cn的情况,如果全局关闭缓存,cn部分就没办法开缓存了 |
昂。我理解错了。你是需要指定的ip不写入缓存。 |
Fake IP 虽然分流变简单了,但是缓存却便复杂了 |
支持CIDR? |
domain-rule是基于域名的,和查询结果的ip无关 |
好的,谢谢,请问有设计与添加 有CIDR范围不写入缓存 功能的打算吗? |
我翻了一下 #1236 ,好像你是第一个提出 server 或 ip-rules 需要支持 no-cache 的。 但我想知道,在你的使用环境中,谁负责根据域名分流(也就是说谁给出fake-ip的结果)? |
geo:cn都直接在smartdns里闭环查询,只有非cn才会走到xray的dns去fakeip查询 |
根据 Project X 的文档,xray返回的 fake-ip的ttl=1,即使缓存也是一秒过期。那没必要再折腾smartdns啊 |
实际上smartdns里存的是600,smartdns --cache-print |
那你有没有确认xray返回的ttl是多少。。。如果是1,需要修改smartdns |
借 issue 问个也和缓存相关的问题,如果 smartdns 监听了两个端口,分别处理 cn 和 ncn 的域名请求,且都开启了缓存,那么在 serve-expired yes 和 prefetch-domain yes 的情况下,域名预取时会根据原查询端口进行预取还是直接使用 default nameserver 进行查询呢? |
就我所知cache是以不同的group分别做cache。prefetch会遵循在cache时记录的组(如果启用了持久缓存,可能会导致重启后组配置变化了,但仍走原来的组 |
需求应用场景
建议的方案
研究了下文档没发现如何实现,现在是否已经能支持,还是不行?
The text was updated successfully, but these errors were encountered: