// Hystrix pattern @HystrixCommand(fallbackMethod = "getCachedFriendsList") public List<PSNUser> getFriends(String userId) return psnUserService.fetchBatch(userId.getFriendIds());
| SLI | Target (SLO) | Instrumentation | | :--- | :--- | :--- | | | < 200 ms | Prometheus histogram on token validation | | Entitlement consistency | 99.99% (no false negatives) | Audit log of license_granted vs license_denied | | Online ID uniqueness | 100% | Database unique constraint violation metric | | GDPR deletion latency | < 30 days (regulatory) | Queue depth of psnuser_deletion topic | 8. Failure Scenarios & Mitigations 8.1 Cascading Failure via Social Graph If the psnuser service is slow, any service that displays friend lists (e.g., "What are my friends playing?") will also fail. The mitigation is circuit breaking : psnuser
"accountId": "a1b2c3d4-...", "onlineId": "VenomSnake2024", "avatar": "https://avatar.api.playstation.com/v1/avatars/123", "trophySummary": "platinum": 12, "gold": 84, "silver": 210, "bronze": 845, "level": 287 , "plusStatus": "essential", "privacy": "presenceVisibility": "friends_only", "trophyVisibility": "public" "trophySummary": "platinum": 12
message PSNUser UUID account_uuid = 1; // Immutable, partition key string online_id = 2; // Mutable, unique secondary index AccountFlags flags = 3; // Bitmask: adult, mfa_enabled, sub_account map<Region, Wallet> wallets = 4; // Multi-currency support repeated Entitlement entitlements = 5; // Game licenses, PS+ status SocialGraph social = 6; // Friends, blocks, following (bidirectional) PrivacySettings privacy = 7; // Telemetry opt-out, presence visibility "privacy": "presenceVisibility": "friends_only"
private List<PSNUser> getCachedFriendsList(String userId) // Return stale cache + emit degraded metric
| Sub-domain | Storage Technology | Consistency Model | | :--- | :--- | :--- | | | CockroachDB (Global, Strong) | Serializable | | Profile & Social | Cassandra + Redis | Eventual (Read-your-writes) | | Entitlements/Licenses | AWS DynamoDB (GSI over-specified) | Strong (for purchases) | | Telemetry/Trophies | Apache Kafka + S3 Data Lake | At-least-once |