Skip to content

Harden yjs container readiness and shutdown behavior - #3247

Open
AlexAndBear wants to merge 1 commit into
mainfrom
feat/yjs-production-grade-service
Open

Harden yjs container readiness and shutdown behavior#3247
AlexAndBear wants to merge 1 commit into
mainfrom
feat/yjs-production-grade-service

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

This change upgrades the services/yjs container behavior for production-style operation.

It adds:

  • container image HEALTHCHECK based on actual readiness (/healthz/ready) and WebSocket reachability
  • graceful signal handling (SIGTERM/SIGINT/SIGQUIT) with a documented grace period
  • shutdown draining behavior: readiness flips to unhealthy, new upgrades/authentications are rejected, then active connections are closed and document unload/flush paths run
  • compose dependency gating with depends_on + condition: service_healthy where applicable
  • administrator documentation for restart policy, grace period, health semantics, and logging

Related Issue

  • Fixes N/A

How Has This Been Tested?

  • test environment: local development on macOS
  • test case 1: pnpm --filter opencloud-yjs-server check:types
  • test case 2: pnpm exec eslint services/yjs/src/server.ts services/yjs/src/healthcheck.ts
  • test case 3: pnpm exec prettier --check services/yjs/src/server.ts services/yjs/src/healthcheck.ts services/yjs/README.md docker-compose.yml
  • test case 4: docker compose config >/tmp/docker-compose.resolved.yml

Types of changes

  • Bugfix
  • Enhancement (a change that does not break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear force-pushed the feat/yjs-production-grade-service branch from 8cd0eca to fcfa099 Compare August 27, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant