spring-cloud-circuitbreaker-instances

Single-instance CircuitBreaker

License

License

GroupId

GroupId

com.manymobi
ArtifactId

ArtifactId

spring-cloud-circuitbreaker-instances
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

spring-cloud-circuitbreaker-instances
Single-instance CircuitBreaker
Project URL

Project URL

https://github.com/k631583871/spring-cloud-circuitbreaker-instances
Source Code Management

Source Code Management

https://github.com/k631583871/spring-cloud-circuitbreaker-instances

Download spring-cloud-circuitbreaker-instances

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Introduction

An extension of spring cloud gateway circuit breaker realizes the fusing of a single instance without affecting other same applications

Spring cloud gateway circuit breaker difference

  • Spring cloud gateway circuit breaker will use the same fuse for the same args.name. As long as there is a problem with one instance, the service under the fuse cannot be accessed. In particular, when the "loadbalancerclientfilter" is used for load balancing, configure the fuse. When an instance under load balancing has a problem, triggering the fuse will cause other instances to be inaccessible.

  • The instance circuit breaker implements separate fuse calculation for each instance of specific access. When there is a problem in one instance of the same application, the access of other instances will not be affected.

Explanation of terms

In order to prevent conceptual conflicts, special interpretation

  • Same application: indicates an application with the same name in the registration center
  • Instance: each startup of the application is an instance, and different ports of the same IP are different instances

Instructions

  • Add spring-cloud-circuitbreaker-instances dependency

    • Maven:
      <dependency>
          <groupId>com.manymobi</groupId>
          <artifactId>spring-cloud-circuitbreaker-instances</artifactId>
          <version>1.0</version>
      </dependency>
    • Gradle
      compile group: 'com.manymobi', name: 'spring-cloud-circuitbreaker-instances', version: '1.0'
  • Example application.yml

    spring:
      cloud:
        gateway:
          routes:
          - id: instancescircuitbreaker_route
            uri: https://example.org
            filters:
            - InstancesCircuitBreaker=myCircuitBreaker
    
  • See official documents for other ways of use Just replace filters.name "CircuitBreaker" with "InstancesCircuitBreaker"

License

Spring Cloud Circuitbreaker Instances is Open Source software released under the Apache 2.0 license.

Versions

Version
1.0