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

feat(kuma-cp): circuit breaker #781

Merged
merged 10 commits into from
Jun 2, 2020
Merged

feat(kuma-cp): circuit breaker #781

merged 10 commits into from
Jun 2, 2020

Conversation

lobkovilya
Copy link
Contributor

@lobkovilya lobkovilya commented May 26, 2020

Summary

This PR introduces a new Policy - CircuitBreaker. Initially proposed format was adjusted and now looks like this:

type: CircuitBreaker
mesh: default
name: cb1
destinations:
    - match:
        service: redis
sources:
    - match:
        service: web
        version: "0.1"
conf:
    interval: 5s
    maxEjectionPercent: 50
    baseEjectionTime: 5s
    splitExternalAndLocalErrors: false
    detectors:
        totalErrors:
            consecutive: 20
        gatewayErrors:
            consecutive: 10
        localErrors:
            consecutive: 2
        standardDeviation:
            factor: 1.9
            minimumHosts: 3
            requestVolume: 20
        failure:
            minimumHosts: 3
            requestVolume: 20
            threshold: 85

Note: This PR doesn't remove passive HealthCheck. Maybe it makes sense to get rid of passive HealthCehck in a major release.

Docs in kumahq/kuma-website#206

@lobkovilya lobkovilya requested a review from a team May 26, 2020 15:54
@lobkovilya lobkovilya changed the title Feat: circuit breaker feat(kuma-cp): circuit breaker May 26, 2020
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

Looks good, some minor comments 👍

// base time multiplied by the number of times the host has been ejected
google.protobuf.Duration baseEjectionTime = 2;
// The maximum percent of an upstream cluster that can be ejected due to
// outlier detection, has to be in [0.0 - 100.0] range
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean [0-100] range? It's an UInt32Value

mesh_core "github.com/Kong/kuma/pkg/core/resources/apis/mesh"
)

func CircuitBreaker(circuitBreaker *mesh_core.CircuitBreakerResource) ClusterBuilderOpt {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change the name here to OutlierDetectionConfigurer? I think that names in pkg/xds/envoy should be Envoy names, not Kuma names. Look at RBAC. We call it NetworkRBACConfigurer, not TrafficPermissionConfigurer

@subnetmarco
Copy link
Contributor

Please merge when ready for 0.5.1.

Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

change circuit_breaker_configurer.go to outlier_detection_configurer.go, resolve conflicts and you're good to go

# Conflicts:
#	app/kumactl/pkg/install/k8s/control-plane/templates_vfsdata.go
#	pkg/xds/generator/outbound_proxy_generator.go
@lobkovilya lobkovilya merged commit c287516 into master Jun 2, 2020
@lobkovilya lobkovilya deleted the feat/circuit-breaker branch July 29, 2020 13:59
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.

4 participants