Skip to main content

Data stores

Data stores and events. Each of the eight services connects to its own database on one PostgreSQL server. The LMS, program, analytics and notification services also use Redis. Services publish to and consume from Kafka topics.

PostgreSQL​

One PostgreSQL 16 server with the pgvector extension runs as a Deployment with one replica. It holds eight databases, one per service, created by infra/postgres/init-multiple-dbs.sh:

startupos_identity, startupos_onboarding, startupos_mentorship, startupos_program, startupos_copilot, startupos_lms, startupos_notifications, startupos_analytics.

Keycloak keeps its data in a database named keycloak on the same server (infra/k8s/keycloak.yaml). The analytics service reads startupos_lms through a second datasource. No other service reads another service's database.

Migrations​

Each service has Flyway migrations in src/main/resources/db/migration. Hibernate runs with schema generation off, so every entity change needs a matching migration.

ServiceLatest migration at the time of writing
ai-copilotV3
analyticsV5
identityV7
lmsV14
mentorshipV6
notificationV3
onboardingV8
programV7

Redis​

One Redis 7 instance with one replica. The LMS service uses it for caching, the leaderboard, distributed locks and rate counters. The program, analytics and notification services use it for caching. The mentorship and copilot services configure a Redis client, but no use was found in their code.

Persistence and backup​

The PostgreSQL and Redis Deployments are single replicas. Backup and restore arrangements for PostgreSQL are unverified: no backup job was found in infra/k8s.

Sources: infra/k8s/postgres.yaml, infra/k8s/redis.yaml, infra/postgres/init-multiple-dbs.sh, services/*/src/main/resources/application.yml, services/*/src/main/resources/db/migration.