diff --git a/docs/streams/developer-guide/running-app.html b/docs/streams/developer-guide/running-app.html index a6c603f2a3c21..16f563b222222 100644 --- a/docs/streams/developer-guide/running-app.html +++ b/docs/streams/developer-guide/running-app.html @@ -46,6 +46,7 @@
  • Determining how many application instances to run
  • +
  • Handling crashes and failures
  • @@ -134,6 +135,23 @@

    Determining how many application instance
  • Data should be equally distributed across topic partitions. For example, if two topic partitions each have 1 million messages, this is better than a single partition with 2 million messages and none in the other.
  • Processing workload should be equally distributed across topic partitions. For example, if the time to process messages varies widely, then it is better to spread the processing-intensive messages across partitions rather than storing these messages within the same partition.
  • +

    +
    +

    Handling crashes and failures

    +

    There are a few things you can do to reduce the likelihood of crashes and failures of your Kafka Streams application. +

    +

    +

    If your Kafka Streams application does crash or fail, it will first enter the PENDING_ERROR state + to gracefully close all of its existing resources, and then transition into the ERROR state. + It is important to note that the PENDING_ERROR state is not recoverable, and only a + restart will get the application back to the RUNNING state, thus monitoring for this state in addition to the ERROR + state is important to ensure that your application is able to recover. +