Blog

Why Package Managers Send Their Own Identifier

Package managers fetching dependencies send their own user agent rather than a generic library default. The convention serves both the registry and the tool.

Registries need to separate traffic types

A registry serves interactive browsing, installation from developer machines, and automated builds, each with different volume characteristics and different acceptable latency.

Distinguishing them lets the registry apply appropriate limits and understand its own load, which is difficult if everything arrives as a generic client.

Automated build traffic in particular is bursty and repetitive, and treating it identically to interactive use serves neither well.

The separation also makes capacity planning possible, since build traffic grows with the number of pipelines rather than with the number of developers.

The identifier carries the tool version

Including the tool's version lets a registry detect clients with known problems, such as versions that retry excessively or request more than they need.

It also supports deprecation, since a registry can measure how much traffic still comes from versions it intends to stop supporting.

Without version information, such a decision has no evidence behind it beyond guesswork about adoption.

Platform detail supports correct artefact selection

Where packages ship compiled components, the registry may need to know the platform and architecture to serve the right artefact.

Some tools include this in the identifier, which lets the selection happen server-side rather than requiring the client to know what exists.

This is one of the few contexts where detailed platform reporting is straightforwardly useful, since a wrong choice produces something that will not run.

Continuous integration traffic is recognisable

Build environments often add their own token, so registry traffic from automated pipelines can be distinguished from developer machines.

That distinction supports caching guidance and rate policy, since a build fetching the same dependencies repeatedly is a different problem from a developer installing once.

It also helps registries advise on mirror use, which is usually the right answer for high-volume automated fetching.

The pattern generalises

What package managers do is what any automated client should do: identify the software, its version, and enough context for the server to treat the traffic sensibly.

The reason it is universal in this ecosystem is that both sides felt the consequences of not doing it, and the convention settled quickly.

Elsewhere the incentive is weaker and defaults survive, which is why so much automated traffic is still unattributable to anything beyond a library name.

The difference is that registries could apply pressure directly, having a relationship with the tools fetching from them. Most servers have no such relationship.