Fault Tolerance Introduction

Fault Tolerance is part of the MicroProfile set of specifications. This API defines mostly annotations that improve application robustness by providing support to conveniently handle error conditions (faults) that may occur in real-world applications. Examples include service restarts, network delays, temporal infrastructure instabilities, etc.

Maven Coordinates

To enable MicroProfile Fault Tolerance either add a dependency on the helidon-microprofile bundle or add the following dependency to your project’s pom.xml (see Managing Dependencies).

     <dependency>
         <groupId>io.helidon.microprofile</groupId>
         <artifactId>helidon-microprofile-fault-tolerance</artifactId>
     </dependency>
Copied

Fault Tolerance in Helidon

The latest implementation of MP Fault Tolerance is built on top of Helidon’s SE Fault Tolerance. Thus, some configuration for Helidon SE Fault Tolerance also applies to MP. The next section describes configuration properties that are of particular interest to MP applications.

Configuration

Helidon’s implementation uses two types of thread pools: normal and scheduled. The default core size of these executors is 16; however, that can be configured using in your application.yaml file:

executor:
  core-pool-size: 32

scheduled-executor:
  core-pool-size: 32
Copied

or in your microprofile-config.properties as follows:

executor.core-pool-size=32
scheduled-executor.core-pool-size=32
Copied

For a complete set of properties available to configure these executors, see ServerThreadPoolSupplier and ScheduledThreadPoolSupplier.