3.1 KiB
3.1 KiB
Runbook
Startup Checklist
Before starting userservice, verify:
USERSERVICE_REDIS_ADDRpoints to the intended Redis instance- internal HTTP bind address is free
- optional admin metrics listener does not collide with another process
- domain-events stream settings match the environment that consumes them
Expected startup behavior:
- configuration is loaded and validated first
- Redis-backed stores and publishers are constructed
- startup fails fast on Redis misconfiguration or connectivity failure
Health And Readiness
userservice does not expose public health endpoints.
Operational readiness is typically checked through one trusted internal route, for example:
GET /api/v1/internal/users/{user_id}/exists
with a guaranteed-missing user_id. A healthy process returns 200 with
{"exists":false}.
If admin metrics are enabled, /metrics on the admin listener is the
additional process-level operational endpoint.
Common Failure Modes
Redis unavailable
Symptoms:
- process fails during startup
- internal API returns
503 service_unavailable - domain events stop being published
Checks:
- connectivity to
USERSERVICE_REDIS_ADDR - Redis ACL credentials
- Redis DB number
- TLS setting mismatch
Invalid registration context
Symptoms:
ensure-by-emailreturns400 invalid_request
Checks:
preferred_languageis a valid BCP 47 tagtime_zoneis a valid IANA time-zone name
profile update rejected
Symptoms:
- profile update returns
400 invalid_requestor409 conflict
Checks:
- submitted
display_namepassespkg/util/string.go:ValidateTypeName; empty values are accepted and reset the stored display name - user is not currently blocked by
profile_update_block user_nameis immutable; any attempt to mutate it surfaces as409 conflict
declared-country sync rejected
Symptoms:
- geo sync returns
400 invalid_request
Checks:
- country code is uppercase ISO 3166-1 alpha-2
- trusted caller is using the intended internal route
Safe Rollout Notes
- Keep
Auth / Session ServiceandUser Servicealigned on the currentregistration_contextshape. - During the current rollout, treat the authsession-provided
preferred_languagederived from publicAccept-Language, with fallback toen, as the active create-path contract. - Gateway direct
user.*self-service routing depends on the internal REST routes staying stable. - Do not roll out billing-driven entitlement mutations assuming another
service owns current entitlement state.
User Serviceremains the source of truth for current entitlement.
Debugging Data Mismatches
When a caller reports mismatched user state:
- Read the current account aggregate through the trusted internal route.
- Confirm whether the discrepancy is in source-of-truth state or in a downstream projection.
- If the issue concerns declared-country workflow history, switch to
Geo Profile Service;User Servicestores only the current effective value. - If the issue concerns authenticated edge transport, verify the same user
through gateway
user.account.getto distinguish transport problems from source-of-truth problems.