Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(balancer) start only needed upstream update timers #8694

Merged

Conversation

locao
Copy link
Contributor

@locao locao commented Apr 18, 2022

Summary

When Kong is using worker_consistency = eventual, a timer is used to update the internal balancer state on every worker_state_update_frequency seconds. Instead of using the same timer for all changes, the said timer was being started again on every balancer update, the previous ones were kept running, piling up the number of timers.

Full changelog

  • Fixed timer start in runloop/balancer.
  • Added a regression test.

FTI-3274

@locao locao requested a review from a team as a code owner April 18, 2022 19:06
@gszr gszr merged commit a9f9b23 into master May 25, 2022
@gszr gszr deleted the fix/eventual_consistency_timer_usage_on_balancer_update branch May 25, 2022 17:03
oowl pushed a commit that referenced this pull request Aug 15, 2024
Cherry-picked from #12305

This commit introduces a brand new implementation of the DNS client for Kong.
Key features and improvements:

- Designed for easy maintenance and troubleshooting
- Follows industry norms
- Utilizes `lua-resty-mlcache` for cross-worker DNS result caching
- Implements stale-while-updating and stale-if-error behaviors
- Improves responsiveness and reduces resolver traffic, especially with many workers

The new DNS client is enabled by default. To use the old client, set
`legacy_dns_client = on` in `kong.conf`.

KAG-3220

---------

Co-authored-by: Keery Nie <[email protected]>
Co-authored-by: Aapo Talvensaari <[email protected]>
Co-authored-by: Thijs Schreijer <[email protected]>
Co-authored-by: Chrono <[email protected]>
Co-authored-by: Qi <[email protected]>
Co-authored-by: Thibault Charbonnier <[email protected]>
Co-authored-by: Datong Sun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants