Skip to content

Conversation

cloudjumpercat
Copy link
Contributor

@cloudjumpercat cloudjumpercat commented Sep 4, 2025

Description

Fixes #2619

Preview Links

For reviewers, decK doesn't support failover yet, so use this to configure your targets in the how to:

# Target 1
curl -sS -X POST http://localhost:8001/upstreams/example-upstream/targets \
  -H "Content-Type: application/json" \
  -d '{
    "target": "host.docker.internal:9001",
    "weight": 100,
    "failover": false
  }'

# Target 2
curl -sS -X POST http://localhost:8001/upstreams/example-upstream/targets \
  -H "Content-Type: application/json" \
  -d '{
    "target": "host.docker.internal:9002",
    "weight": 100,
    "failover": false
  }'

# Target 3
curl -sS -X POST http://localhost:8001/upstreams/example-upstream/targets \
  -H "Content-Type: application/json" \
  -d '{
    "target": "host.docker.internal:9003",
    "weight": 50,
    "failover": true
  }'

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@cloudjumpercat cloudjumpercat requested a review from a team as a code owner September 4, 2025 22:12
Copy link

netlify bot commented Sep 4, 2025

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 9e696fc
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/68bf31a8b93b6b00091c54fb
😎 Deploy Preview https://deploy-preview-2772--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@lena-larionova lena-larionova left a comment

Choose a reason for hiding this comment

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

Ran through it, had no trouble.

Do we know if decK is going to support this before release? If not, then we'll need to use curl (and add a separate command to create an Upstream before creating Targets).

If decK is going to support this soon, then we should mark the version of decK in the prereqs.

@cloudjumpercat
Copy link
Contributor Author

Do we know if decK is going to support this before release? If not, then we'll need to use curl (and add a separate command to create an Upstream before creating Targets).

If decK is going to support this soon, then we should mark the version of decK in the prereqs.

@lena-larionova I've asked eng about this and will adjust the docs depending on what I hear back.

Copy link

@locao locao left a comment

Choose a reason for hiding this comment

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

This looks pretty good!

I have just a few comments:

  • I didn't see any mention that more than one target can be used as failover. If you think it's worth adding this info, you could say their weights will be respected when choosing which one will proxy the request.
  • I see the Target Schema is included from somewhere else. Is it from the code? In the rendered doc it is missing the failover field.
  • I think it is worth mentioning nothing blocks the user from adding a failover target to consistent-hashing and sticky-sessions upstreams, but they will be ignored, not used in regular balancing or acting as failover.

@cloudjumpercat
Copy link
Contributor Author

@locao Thanks for the feedback! I've applied changes for your suggestions. For this:

I see the Target Schema is included from somewhere else. Is it from the code? In the rendered doc it is missing the failover field.

We autogenerate the schema closer to release in our release/gateway-3.12 branch.

@lena-larionova
Copy link
Contributor

@locao Thanks for the feedback! I've applied changes for your suggestions. For this:

I see the Target Schema is included from somewhere else. Is it from the code? In the rendered doc it is missing the failover field.

We autogenerate the schema closer to release in our release/gateway-3.12 branch.

We should be able to do this now - I'll get it updated on the release branch.

Copy link
Contributor

@lena-larionova lena-larionova left a comment

Choose a reason for hiding this comment

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

LGTM, and pre-approved. You can merge it with decK instructions if our confidence on that is high.

@cloudjumpercat
Copy link
Contributor Author

You can merge it with decK instructions if our confidence on that is high.

@lena-larionova It's likely decK won't support this with GA, so I've converted the failover examples to API requests.

@cloudjumpercat
Copy link
Contributor Author

Broken links are expected since the pages are /unreleased

@cloudjumpercat cloudjumpercat merged commit 44ade39 into release/gateway-3.12 Sep 8, 2025
10 of 11 checks passed
@cloudjumpercat cloudjumpercat deleted the feat/failover-targets branch September 8, 2025 19:54
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.

3 participants