Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate liveness, readiness and startup services #150

Merged

Conversation

richard-axual
Copy link
Contributor

After testing with the ready service for liveness, readiness and startup it became clear that all have different definitions in KSML.

Added the CREATED state to the ComponentState enum.

ProducerRunner now uses states CREATED->STARTING->STARTED->STOPPING->STOPPED or FAILED in case of failures
StreamsRunner now maps the internal Streams state

  • KafkaStreams.State CREATED -> ComponentState.CREATED;
  • KafkaStreams.State REBALANCING -> ComponentState.STARTING;
  • KafkaStreams.State RUNNING -> ComponentState.STARTED;
  • KafkaStreams.State PENDING_SHUTDOWN -> ComponentState.STOPPING;
  • KafkaStreams.State NOT_RUNNING -> ComponentState.STOPPED;
  • KafkaStreams.State PENDING_ERROR, ERROR -> ComponentState.FAILED;

Startup service

  • Returns HTTP Status 500 if both ProducerRunner AND StreamsRunner are in state NOT_APPLICABLE (misconfiguration)
  • Returns HTTP Status 204 if ProducerRunner AND StreamsRunner is in state NOT_APPLICABLE, STARTING, STARTED, STOPPING, STOPPED
  • Returns HTTP Status 500 in other scenarios

Readiness service

  • Returns HTTP Status 500 if both ProducerRunner AND StreamsRunner are in state NOT_APPLICABLE (misconfiguration)
  • Returns HTTP Status 204 if ProducerRunner is in state NOT_APPLICABLE, STARTED, STOPPING, STOPPED and StreamsRunner is in state NOT_APPLICABLE or STARTED (allows for one to be disabled and the other started, or the ProducerRunner to gracefully stop)
  • Returns HTTP Status 500 in other scenarios

Liveness service

  • Returns HTTP Status 500 if both ProducerRunner AND StreamsRunner are in state NOT_APPLICABLE (misconfiguration)
  • Returns HTTP Status 500 if ProducerRunner is in state FAILED OR StreamsRunner is in state FAILED or STOPPED
  • Returns HTTP Status 204 in other scenarios

Updated helm to use the separate probe services
@jeroenvandisseldorp jeroenvandisseldorp merged commit 2d6ce3a into Axual:main Aug 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants