external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

feat(ovh): add cache based on DNS zone SOA value

Open rbeuque74 opened this issue 3 years ago • 3 comments
trafficstars

Hello external-dns maintainers, OVHcloud API team here :wave:

Description This pull-request patches the 'ovh' provider to add a small local cache of the fetched DNS records.

Context: we detected that numerous of our customers use your external-dns software to manage their DNS records, sending waves of API queries to our APIs. As these records are retrieved one by one, it generates a high amount of requests on our backend.

As we would like to keep allowing our customers using external-dns with the best experience, we leveraged the usage of the DNS zone SOA Serial to detect if the zone records might have changed since the last time we generated the cache. This way, we spare all the calls to retrieve the records that have been kept in cache, and serve them directly, since the SOA Serial haven't changed, guaranteeing that the DNS zone hasn't changed on our side.

This will also add a speed-up once the cache is warm, as long as the zone doesn't change.

This should also prevent users of external-dns from being targeted by potential rate-limiting in case of high activity on our backend.

Thanks in advance for your review. Romain

Checklist

  • [x] Unit tests updated
  • [x] End user documentation updated

rbeuque74 avatar Sep 15 '22 10:09 rbeuque74

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: rbeuque74 / name: Romain Beuque (1a48cb8e165232ee16a465afb5bc51d26d64b549)

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rbeuque74 Once this PR has been reviewed and has the lgtm label, please assign seanmalloy for approval by writing /assign @seanmalloy in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Sep 15 '22 10:09 k8s-ci-robot

Welcome @rbeuque74!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Sep 15 '22 10:09 k8s-ci-robot

Hello, Kind reminder about this pull-request. Feel free to tell me if you want me to do some modification !

Best, Romain

rbeuque74 avatar Sep 26 '22 10:09 rbeuque74

/auto-cc /cc @szuecs

rbeuque74 avatar Oct 11 '22 13:10 rbeuque74

Hi, any news aboutt his PR? :) Thanks

scraly avatar Oct 17 '22 07:10 scraly

/assign @njuettner /assign @szuecs

rbeuque74 avatar Nov 28 '22 11:11 rbeuque74

/assign @seanmalloy

rbeuque74 avatar Nov 28 '22 11:11 rbeuque74

/approve

szuecs avatar Dec 19 '22 21:12 szuecs

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rbeuque74, szuecs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Dec 19 '22 21:12 k8s-ci-robot

/assign @njuettner

szuecs avatar Dec 19 '22 21:12 szuecs

I don't have the button to run the tests, so assigned @njuettner

szuecs avatar Dec 19 '22 21:12 szuecs

@rbeuque74 can you rebase so that I can let the test run and review the PR? Thanks!

Raffo avatar Jan 08 '23 20:01 Raffo

Hello @Raffo, PR is rebased !

Thanks Romain

rbeuque74 avatar Jan 09 '23 11:01 rbeuque74

@rbeuque74: PR needs rebase.

and rebased :D

rbeuque74 avatar Jan 12 '23 09:01 rbeuque74

Hello, Any news regarding this PR ?

Thanks, Romain

rbeuque74 avatar Jan 27 '23 13:01 rbeuque74

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jun 09 '23 18:06 k8s-triage-robot

Hello,

PR is rebased. Thanks, Romain

/remove-lifecycle stale

rbeuque74 avatar Jun 12 '23 08:06 rbeuque74

/ok-to-test

szuecs avatar Jun 30 '23 12:06 szuecs

Please rebase

szuecs avatar Jun 30 '23 12:06 szuecs

Hello, pull-request is now rebased, thanks for approving the test run :)

/assign @szuecs

Romain

rbeuque74 avatar Jul 17 '23 10:07 rbeuque74

/lgtm

johngmyers avatar Aug 12 '23 19:08 johngmyers

/test pull-external-dns-lint /test pull-external-dns-unit-test

johngmyers avatar Aug 12 '23 19:08 johngmyers

/retest

johngmyers avatar Aug 12 '23 20:08 johngmyers