HEAD requests to a distribution's base_url can timeout if sufficiently large

Open
#3,774 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by tracing the distribution request path around _stream_and_match and distro.content_handler(rel_path), comparing GET and HEAD handling. Review related issue #2924 for prior context. Done means HEAD requests to large distributions avoid timing out while preserving plugin-specific handling and returning appropriate headers.

Written by the indexing model from the issue text.

Description

Issue Performance

Version
pulpcore<=3.21

Description
With a distribution of over 1 million content units GET & HEAD requests to the base_url take too long to complete and timeout. There should probably be some shortcut logic for HEAD requests that maybe just populate headers with the amount of content + last updated time.

In the _stream_and_match call we check if the distribution has a plugin specific handle first through distro.content_handler(rel_path). I think we should also pass the request (or at least request type) to this method to allow plugins to decide what to do first before we check and perform a HEAD shortcut afterwards.

Additional context
Related previous issue: https://github.com/pulp/pulpcore/issues/2924

Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pulp/pulpcore

All issues in pulp/pulpcore

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.