clear references
This commit is contained in:
@@ -5,7 +5,7 @@ meta:
|
||||
feature: web-production
|
||||
priority: P1
|
||||
depends_on: []
|
||||
tags: [performance, database, production]
|
||||
tags: [performance, database, production, turso, sqlite]
|
||||
|
||||
objective:
|
||||
- Optimize database connections and queries for production load
|
||||
@@ -17,10 +17,10 @@ deliverables:
|
||||
- Slow query logging
|
||||
|
||||
steps:
|
||||
1. Configure connection pooling:
|
||||
- If using PostgreSQL: configure PgBouncer or use @libsql/client pooling
|
||||
- Set max connections based on server instances (e.g., 20 per instance)
|
||||
- Add connection timeout and idle timeout settings
|
||||
1. Configure connection handling:
|
||||
- Turso/libsql handles connection management internally — no external pool needed
|
||||
- Configure `@libsql/client` with appropriate timeout settings
|
||||
- Leverage Turso's edge distribution for low-latency reads
|
||||
2. Audit all Drizzle queries for performance:
|
||||
- Check web/src/server/db/schema/*.ts for missing indexes
|
||||
- Review web/src/server/api/routers/*.ts for N+1 queries
|
||||
@@ -58,5 +58,6 @@ validation:
|
||||
|
||||
notes:
|
||||
- Current schema has some indexes but may need more for production scale
|
||||
- Drizzle ORM doesn't automatically handle connection pooling — configure at driver level
|
||||
- Consider read replicas if dashboard load is heavy
|
||||
- Turso/libsql handles connection management internally — no PgBouncer or connection pool needed
|
||||
- Turso provides edge read replicas automatically — configure primary for writes, edges for reads
|
||||
- SQLite has different query patterns than PostgreSQL — avoid heavy JOINs on large tables, prefer indexed lookups
|
||||
|
||||
Reference in New Issue
Block a user