Comments (6)
The linked issue has been implemented, what's a good default cache size?
from dns.
@amphp/dns Any suggestions?
from dns.
Don't really know.
I think a LRU cache with size=256 should be really sufficient for most needs. That's not too large, but really not less than 99% of use cases will need.
from dns.
If it's a LRU cache, it should be way bigger than 256. Memory is pretty cheap and the entries are pretty small, right?
Is there any problem with having a 64kB entry cache?
from dns.
I meant 256 entries ;-), which, in PHP, will be around 80 KB, I guess. (if using an array as fundamental structure … an object could optimize it a bit, down to probably 30 KB)
from dns.
Yes, it's LRU as implemented in amphp/cache#5. Entries should be pretty small. Keep in mind that one lookup usually creates two entires, one for A
and one for AAAA
.
I guess something like 4096 entries should be totally enough? But most applications probably need way less, because they either query the same domains over and over or query random domains.
from dns.
Related Issues (20)
- Too many time to resolve localhost domain HOT 7
- getting could not load the system's DNS configuration, using synchronous, blocking fallback error HOT 9
- Incomplete packet error (still exists) HOT 1
- Could Not Resolve Host HOT 3
- Backport queue errors on closure
- Rename Record and Resolver as well?
- Amp\Dns\resolve misses optional Cancellation parameter
- Async example? HOT 1
- Resolution where NDots > 1 failing
- Remove amphp/file dependency
- Bump the minimum version of amphp/uri HOT 4
- DNS resolution not working on Kubernetes HOT 5
- Subtype 'Too many redirects' DnsException HOT 1
- CreateProcess failed, error 193 HOT 6
- Libdns bug HOT 5
- Are dotless domains valid? HOT 3
- DNS frequently fails on Windows HOT 3
- Incomplete packet error HOT 4
- etc/resolve ndots set to 1 HOT 1
- Ignore ServFail / NxDomain for search list, e.g. in Kubernetes cluster HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dns.