title: What is a reasonable value for StreamsConfig.COMMIT_INTERVAL_MS_CONFIG for Kafka Streams
body: <p>I was looking to some confluent examples for the Kafka Streams the different values for configuration value 'StreamsConfig.COMMIT_INTERVAL_MS_CONFIG' confused me little bit.</p>
  
  <p>For ex, in micro service example, </p>
  
  <pre><code>config.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 1); //commit as fast as possible
  </code></pre>
  
  <p><a href="https://github.com/confluentinc/kafka-streams-examples/blob/5.1.0-post/src/main/java/io/confluent/examples/streams/microservices/util/MicroserviceUtils.java" rel="nofollow noreferrer">https://github.com/confluentinc/kafka-streams-examples/blob/5.1.0-post/src/main/java/io/confluent/examples/streams/microservices/util/MicroserviceUtils.java</a></p>
  
  <p>Another one,</p>
  
  <pre><code>// Records should be flushed every 10 seconds. This is less than the 
  default
  // in order to keep this example interactive.
  streamsConfiguration.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 10 * 
  1000);
  </code></pre>
  
  <p><a href="https://github.com/confluentinc/kafka-streams-examples/blob/5.1.0-post/src/main/java/io/confluent/examples/streams/WordCountLambdaExample.java" rel="nofollow noreferrer">https://github.com/confluentinc/kafka-streams-examples/blob/5.1.0-post/src/main/java/io/confluent/examples/streams/WordCountLambdaExample.java</a></p>
  
  <p>Another one,</p>
  
  <pre><code>// Set the commit interval to 500ms so that any changes are flushed 
  frequently and the top five
  // charts are updated with low latency.
  streamsConfiguration.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 
   500);
  </code></pre>
  
  <p><a href="https://github.com/confluentinc/kafka-streams-examples/blob/5.1.0-post/src/main/java/io/confluent/examples/streams/interactivequeries/kafkamusic/KafkaMusicExample.java" rel="nofollow noreferrer">https://github.com/confluentinc/kafka-streams-examples/blob/5.1.0-post/src/main/java/io/confluent/examples/streams/interactivequeries/kafkamusic/KafkaMusicExample.java</a></p>
  
  <p>In the examples intervals changes from 1ms to 10000ms, what I am really interested is the 1ms in a system that heavy load all the time, could it be dangerous to go 1ms Commit Interval?</p>
  
  <p>Thx for answers..</p>