com.digitalasset.canton.synchronizer.sequencer.block
BlockSequencerCircuitBreaker
Companion object BlockSequencerCircuitBreaker
class BlockSequencerCircuitBreaker extends NamedLogging
Circuit breaker used for stopping accepting requests when the sequencer is overloaded and falling behind on processing blocks. It works by keeping track of the lastTs on each block process and computing a delay between that timestamp and current time. If the delay is larger than allowedBlockDelay, a failure is registered.
Following the circuit breaker logic described in https://doc.akka.io/libraries/akka-core/current/common/circuitbreaker.html, after maxFailures consecutive failures, requests will no longer be accepted (state goes from closed to open).
After a resetTimeout amount of time has passed in the open state, the circuit goes to half-open state, where requests are accepted, and if the next block delay registered is in the accepted interval, the circuit breaker closes again and requests are accepted, otherwise, it goes back to being open (and requests not accepted). In this case, the resetTimeout is multiplied by the exponentialBackoffFactor to compute the next timeout (up until at most maxResetTimeout).
It is possible to configure separate config breaker parameter per message type.
- Alphabetic
- By Inheritance
- BlockSequencerCircuitBreaker
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BlockSequencerCircuitBreaker(config: CircuitBreakerConfig, clock: Clock, metrics: SequencerMetrics, scheduler: Scheduler, loggerFactory: NamedLoggerFactory)(implicit ec: ExecutionContext)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def disable(): Unit
- def enable(): Unit
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Definition Classes
- BlockSequencerCircuitBreaker → NamedLogging
- implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def registerLastBlockTimestamp(lastTs: Traced[CantonTimestamp]): Unit
- def shouldRejectAcknowledgements: Boolean
- def shouldRejectRequests(submissionRequest: SubmissionRequest): Boolean
- def shouldRejectRequests(submissionRequestType: SubmissionRequestType): Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])