Search
Lessons (27)
- 10,000 Users Do Not Need 10,000 Database Connections
Why a few busy database connections can serve thousands of users, how to size a connection pool, and …
- Debug Latency Like an Investigator
… Some worked numbers: - The pool has 20 connections. - Before: the query takes 10 ms . So 20 connections can …
- Storage Engines & Database Operations
Understand B-trees, LSM trees, write-ahead logs, connection pools, backups and the signals behind database reliability. What …
- Database Internals, Replication and Scaling
… jump to page 212 instead of reading it all. Connection pool A fixed set of open database connections …
- L6 Production Debugging Casebook
… more connections means more queries fighting over the same locks and CPU. See [connection pooling](./connection-pooling-and …
- Concurrency, Resilience & Distributed Workflows
… loop. Connection pools and distributed tracing A connection pool reuses expensive database connections, but the pool is not …
- AWS Security Building Blocks
… up and sign-in Cognito User Pools Passwords, API tokens, connection strings Secrets Manager or Parameter Store Encryption …
- Resilience Patterns
… give each dependency its own limited pool of connections, threads or concurrent calls. A slow recommendations service can …
- Creational Patterns: How to Make Objects
… const pool = new pg.Pool({ connectionString: process.env.DATABASE URL, max: 10 }); js // anywhere.js import { pool } from …
- CloudWatch: Know What Your App Is Doing
… errors and dependency status Connection pool full Are connections leaked or slow? Pool wait time and active queries …
- Node.js and Express
… 5 60 000 }); // ✅ Always release pooled DB clients const client = await pool.connect(); try { await client.query("SELECT …
- Indexes, EXPLAIN & Query Plans
… I also rule out waiting time by checking connection pool waits and locks in pg stat activity . I …
- DynamoDB Modeling, RDS Scaling and Data Resilience
… connection storms Lambda and autoscaling containers can open thousands of connections and exhaust the database. RDS Proxy pools …
- Backend Design Scenarios
… Find the cause in this order: - Graph database QPS, connection-pool wait time, CPU, locks, slow-query percentiles …
- Scaling, Load Balancing & Rate Limiting
… 5. Connection management: reuse connections, apply timeouts and limit slow clients. 6. Protection: enforce request-size limits, quotas …
- Kafka for Backend Services
… Item[] }) { const client = await pool.connect(); try { await client.query("BEGIN"); const orderId = o-${randomUUID()} ; const totalCents = input …
- Observability and Incident Response
… Pool metrics show all database connections in use. Logs link it to a new report query. 14:18 …
- What Are Design Patterns?
… Builder, Prototype, Singleton 🧱 Structural How do I connect objects into bigger structures? Adapter, Bridge, Composite, Decorator, Facade …
- Go Concurrency: Goroutines, Channels and Context
… only one goroutine at a time may enter the protected section Worker pool A fixed number of goroutines …
- Hexagonal Architecture (Ports & Adapters)
… its own language ForPlacingOrders , OrderRepository Adapter Code that connects a real technology to a port Express controller, Postgres …
- Capacity Planning, SLOs and Error Budgets
… CPU, connection-pool use, how old the oldest queue message is, disk, provider quota, database locks. - Link cost …
- AWS Databases: Choose the Right One
… Set bounded pools and timeouts rather than allowing every request to open a new connection. Exercise: Write access …
- Networking, DNS and Traffic Routing
… 2. Connection: open a TCP connection to that IP. 3. TLS: set up encryption (the "s" in https …
- Containers at Scale: ECS Deep Dive and EKS
… slow-starting apps and a deregistration delay for connection draining. - Handle SIGTERM ; stopTimeout controls the wait before SIGKILL …
- Architecture Patterns at Scale
… Services can still be tied together by: - a shared database connection pool (one service uses all connections, everyone …
- Rust: Types, Errors and Concurrency
… sqlx::Error into AppError automatically } fn load user(pool: &PgPool, id: u64) - Result<User, AppError { … } 💡 Libraries: define error …
- Practical Project: Deploy a Real CRM App on EKS
… The pod has credentials, reads the secret and connects to PostgreSQL. The application exhausts its database connection pool …