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

HTTP Liveness Probe Stopgap Fix #232

Merged
merged 4 commits into from
Mar 20, 2025
Merged

HTTP Liveness Probe Stopgap Fix #232

merged 4 commits into from
Mar 20, 2025

Conversation

stevensJourney
Copy link
Collaborator

@stevensJourney stevensJourney commented Mar 19, 2025

Overview

The HTTP liveness probe currently always returns a 400 HTTP response code in the API service mode. This is due to the touched_at value not being updated in the last 10 seconds. Generally, in the API mode, the PowerSync service should be alive if it returned any HTTP response. The logic has been updated to always return 200 if the service has been started in the API mode.

The current logic is preserved if the service is started in the UNIFIED mode. The liveness probe will return a 400 HTTP status code if the replicator engine has not updated the last touched_at value in 10 seconds. The replicator loop is most likely stuck if the touched at value has not been updated.

The HTTP probes are still not yet functional if the service was started purely in the SYNC mode. Future work will introduce more improvements such as an opt-in HTTP sever for this mode and configurable timeouts.

Copy link

changeset-bot bot commented Mar 19, 2025

🦋 Changeset detected

Latest commit: 07cfe95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@powersync/service-core Patch
@powersync/service-core-tests Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
@powersync/service-image Patch
test-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stevensJourney stevensJourney requested a review from rkistner March 19, 2025 11:46
@stevensJourney stevensJourney marked this pull request as ready for review March 19, 2025 11:46
@stevensJourney stevensJourney merged commit 2cb5252 into main Mar 20, 2025
21 checks passed
@stevensJourney stevensJourney deleted the probe-stopgap branch March 20, 2025 08:49
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