Skip to content

feat: PgBouncer pooling, cache warming, search autocomplete, API deprecation - #986

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
demilade18-git:feat/pgbouncer-cache-warming-autocomplete-api-deprecation
Jul 26, 2026
Merged

feat: PgBouncer pooling, cache warming, search autocomplete, API deprecation#986
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
demilade18-git:feat/pgbouncer-cache-warming-autocomplete-api-deprecation

Conversation

@demilade18-git

@demilade18-git demilade18-git commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Closes #951, Closes #952, Closes #953, Closes #954

Changes

#954 - API Version Deprecation Headers

  • RFC 8594 Sunset header on deprecated API versions
  • RFC 7234 Warning header with deprecation details
  • Minimum 90-day deprecation notice enforcement
  • Automated 410 Gone after sunset date
  • Central deprecation policy configuration

#953 - Property Search Autocomplete

  • Real-time debounced suggestions (min 2 chars)
  • Personalized ranking from user search history
  • Trending searches from PopularSearch model
  • Suggestions grouped by type (property, location, feature, recent, popular)

#952 - Redis Cache Warming

  • Initial cache warming on app startup
  • Periodic refresh every 30 minutes via Cron
  • Predictive warming based on access patterns
  • Cache hit-rate monitoring before/after warming cycles

#951 - PgBouncer Connection Pooling

  • PgBouncer service in docker-compose.yml (transaction mode)
  • Prisma connection string with pgbouncer=true params
  • Configurable pool size via environment variables
  • Pool metrics exported to Prometheus

…ecation headers

- MettaChain#951: Add PgBouncer service to docker-compose.yml with transaction-level
  pooling, configure PrismaService for pgbouncer=true, expose pool metrics
  to Prometheus, and add PGBOUNCER_POOL_SIZE env var
- MettaChain#952: Expand CacheWarmingService with @Cron periodic refresh (30 min),
  predictive warming from access patterns, startup warming via OnModuleInit,
  and hit-rate monitoring before/after each warming cycle
- MettaChain#953: Rewrite SearchAutocompleteService to query Prisma SearchHistory
  and PopularSearch models, add personalised ranking (user's own searches
  boosted), deduplicated grouped suggestions by type (property/location/
  feature/recent/popular), and wire userId from the authenticated request
- MettaChain#954: Expand DeprecationWarningInterceptor with RFC 8594 Sunset header,
  RFC 7234 Warning header, minimum 90-day deprecation notice enforcement,
  automatic sunset transition when the sunset date passes, and central
  DEPRECATION_POLICY config in api-version.constants.ts

Closes MettaChain#951 MettaChain#952 MettaChain#953 MettaChain#954
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@demilade18-git Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nanaf6203-bit nanaf6203-bit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nanaf6203-bit
nanaf6203-bit merged commit 7bd5581 into MettaChain:main Jul 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants