Bug 1395831 - Feature request: use DNS to determine if manifests need downloading.
Summary: Feature request: use DNS to determine if manifests need downloading.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 24
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-16 19:20 UTC by Penelope Fudd
Modified: 2016-11-21 12:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-21 12:32:05 UTC
Type: Bug


Attachments (Terms of Use)

Description Penelope Fudd 2016-11-16 19:20:27 UTC
Description of problem:

When checking for updates after its metadata has expired, dnf has to connect to multiple servers, download manifests, validate checksums and signatures, and so on.  This takes time.  Frequently, there are no changes, and so apart from updating the timestamp of the metadata, the operation is a no-op.

Wouldn't it be nice if all that wasted work could be avoided?

The least amount of data that needs to be transferred is a 'last modified time' of the repository manifest.  The lowest-overhead protocol we can use is UDP.  The UDP protocol with the most infrastructure in place for distribution and caching is DNS.  If the last-modified time of a given repository's manifest could be written into a TXT record, then all the client would have to do is the command 'host -t TXT lastmodified.somerepository.com', and parse the result.

However, DNS is not super-secure: packets can be forged or replayed.  To mitigate the replaying problem, add a second timestamp to the TXT record called 'current time', and update the TXT record daily.  If the client gets a TXT record is more than a day old, fall back to the existing behaviour.  To mitigate the forgery problem, use gpg to sign the TXT record.  If the output of gpg is too large to fit nicely in a single UDP packet, compress it, or choose some other signing algorithm.

The result: A speedup of dnf, a reduction in network traffic to the repositories, a cached and widely distributed modification-time service with built-in jitter (to avoid the thundering-herd problem), and no more wasted cpu cycles.

Cheers!

Comment 1 Michael Mráka 2016-11-21 12:32:05 UTC
That sounds like a cool feature but I'm afraid we have no capacity to implement it. Moreover it would require a huge changes in the fedora infrastructure which are not likely to happen.

Closing as deferred.


Note You need to log in before you can comment on or make changes to this bug.