Skip to content

v3.4.0: Cached Market Read Models

Choose a tag to compare

@pwdel pwdel released this 11 Jun 03:59
· 10 commits to main since this release
37a2aad

Summary

This release tightens SocialPredict's display read-model behavior after mixed load testing showed pressure on cached/read endpoints during concurrent hot-market betting.

Highlights

  • Market summary reads now use stored accounting snapshots instead of recalculating full market details on every request.
  • Market discovery cards and pinned market responses prefer cached summary read models.
  • Existing stale display snapshots are served for market positions, market leaderboards, system metrics, and global leaderboard instead of refreshing synchronously on the request path.
  • Transaction paths remain unchanged; these caches are display-only and are not used to decide orders, balances, payouts, or other authoritative financial mutations.
  • Added backend tests proving stale read models are served without synchronous refresh and that summary endpoints avoid full detail recomputation.

Load Testing Context

This release follows the June 10/11 mixed site-load tests, where read traffic was combined with hot-market betting. The next recommended validation is to redeploy this tag and rerun the reduced mixed baseline first, then ladder upward:

  1. 10 bets/sec plus 50 read-model reads/sec for 5m
  2. 15 bets/sec plus 100 read-model reads/sec for 5m
  3. 20 bets/sec plus 150 read-model reads/sec for 5m
  4. Retry 25 bets/sec plus 250 read-model reads/sec only after intermediate runs are clean

Testing

  • go test ./handlers/markets ./handlers/positions ./handlers/metrics ./internal/domain/markets
  • go test ./...