Skip to content

docs: document pulp-api and pulp-content auto-scaling - #1482

Open
carlosthe19916 wants to merge 1 commit into
pulp:mainfrom
carlosthe19916:docs-api-content-autoscaling
Open

carlosthe19916 wants to merge 1 commit into
pulp:mainfrom
carlosthe19916:docs-api-content-autoscaling

Conversation

@carlosthe19916

@carlosthe19916 carlosthe19916 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Adds Auto-scaling subsections for pulp-api and pulp-content in docs/ARCHITECTURE.md, mirroring the existing pulp-worker entry, and lists the new PULP_API/CONTENT_MIN/MAX_REPLICA_COUNT deployment parameters.

Both deployments now have KEDA autoScaler blocks in deploy/clowdapp.yaml (triggering on pulp_api_active_connections / pulp_content_active_connections), but were previously undocumented. Docs-only change.

🤖 Generated with Claude Code

Summary by Sourcery

Documentation:

  • Document auto-scaling behavior and configuration for the pulp-api and pulp-content deployments, including replica limits, metrics, and scaling policies.

@sourcery-ai

sourcery-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the architecture documentation to describe the existing KEDA auto-scaling behavior for pulp-api and pulp-content, including replica bounds, metrics, scaling policies, and environment-specific configuration.

File-Level Changes

Change Details Files
Documents auto-scaling configuration for the API and content deployments.
  • Adds configurable minimum and maximum replica-count parameters.
  • Documents Prometheus connection metrics used as KEDA scaling triggers.
  • Records scale-up, scale-down, and stabilization policies.
  • Notes production API overrides and the content deployment’s default limits across environments.
docs/ARCHITECTURE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/ARCHITECTURE.md" line_range="546-547" />
<code_context>
   - Readiness: GET `/api/pulp/api/v3/livez/` (delay: 5s, period: 60s)
   - Liveness: GET `/api/pulp/api/v3/livez/` (delay: 10s, period: 120s)
+- **Auto-scaling**:
+  - Min replicas: 1 (configurable via `PULP_API_MIN_REPLICA_COUNT`; production: 50 on `crcp01ue1`, 15 on `pulpp01ue1`)
+  - Max replicas: 10 (configurable via `PULP_API_MAX_REPLICA_COUNT`; production: 50 on `crcp01ue1`, 30 on `pulpp01ue1`)
+  - Trigger: Prometheus metric `pulp_api_active_connections` (scales on average concurrent requests per pod; threshold tuned in `deploy/clowdapp.yaml`)
+  - Scale up: 5 pods per 30s
</code_context>
<issue_to_address>
**issue:** The API auto-scaling subsection states that production uses a minimum of 50 replicas on `crcp01ue1` and 15 on `pulpp01ue1`, while the production topology table states 50 and 10 API pods respectively. The documented topology is therefore internally contradictory, and the table's 10-pod deployment is below the documented production minimum of 15.

**Triggers:** When readers use the production topology table and the new auto-scaling subsection together.

**Suggested fix:** Update either the production topology table or the production override values in the auto-scaling subsection so both describe the same replica ranges.

```suggestion
  - Min replicas: 1 (configurable via `PULP_API_MIN_REPLICA_COUNT`; production: 50 on `crcp01ue1`, 10 on `pulpp01ue1`)
  - Max replicas: 10 (configurable via `PULP_API_MAX_REPLICA_COUNT`; production: 50 on `crcp01ue1`, 10 on `pulpp01ue1`)
```
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: docs/ARCHITECTURE.md:547


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/ARCHITECTURE.md Outdated
Add Auto-scaling subsections for pulp-api and pulp-content in
ARCHITECTURE.md, matching the existing pulp-worker entry, and list the
new PULP_API/CONTENT_MIN/MAX_REPLICA_COUNT deployment parameters. Both
deployments now have KEDA autoScaler blocks in deploy/clowdapp.yaml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@carlosthe19916
carlosthe19916 force-pushed the docs-api-content-autoscaling branch from 5a9571f to c193391 Compare September 17, 2026 09:08

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

@carlosthe19916

Copy link
Copy Markdown
Contributor Author

@sourcery-ai review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant