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

add health check for load balance servers #857

Merged
merged 10 commits into from
Nov 28, 2022

Conversation

samanhappy
Copy link
Collaborator

This PR introduces a health check mechanism for proxy servers which support configuring probe interval, path, timeout, fail and pass threhold.

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2022

Codecov Report

Base: 77.09% // Head: 77.03% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (8325e0f) compared to base (59cc1a2).
Patch coverage: 77.77% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #857      +/-   ##
==========================================
- Coverage   77.09%   77.03%   -0.06%     
==========================================
  Files         108      108              
  Lines       12241    12340      +99     
==========================================
+ Hits         9437     9506      +69     
- Misses       2278     2300      +22     
- Partials      526      534       +8     
Impacted Files Coverage Δ
pkg/filters/proxy/server.go 80.00% <60.86%> (-20.00%) ⬇️
pkg/filters/proxy/loadbalance.go 85.66% <80.24%> (-3.34%) ⬇️
pkg/filters/proxy/basepool.go 75.78% <92.30%> (+1.97%) ⬆️
pkg/filters/validator/basicauth.go 78.80% <0.00%> (-1.85%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@localvar localvar left a comment

Choose a reason for hiding this comment

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

when service discovery is enabled, the server list changes from time to time, this case is not handled by this pr.

pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/server.go Outdated Show resolved Hide resolved
doc/reference/filters.md Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/basepool.go Outdated Show resolved Hide resolved
pkg/filters/proxy/basepool.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
@suchen-sci suchen-sci merged commit b80a9cf into easegress-io:main Nov 28, 2022
@samanhappy samanhappy deleted the health branch November 28, 2022 08:06
caoshengdong pushed a commit to caoshengdong/easegress that referenced this pull request Dec 20, 2022
* add health check for loadbalance servers

* add lock

* fix lock for race condition

* refactor lock to atomic.Value

* optmize usage of atomic.Value

* fix goroutine leak & other optimizations

* validate config & fix typo

* fix leak and close & use duration format

* fix test

* apply suggestions
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.

None yet

4 participants