Skip to content
tezvyn:

Search

Find a bite, explore a topic or look for a role.

Results for PostgreSQL

Bites 111

Databases & Architecture1 min read

What is a database page?

A page is a fixed-size block, often 8KB, holding multiple rows; databases read and write whole pages because disk and OS I/O are block-oriented, amortizing seek cost and matching the buffer pool unit.

Databases & Architecture1 min read

How MVCC enables non-blocking reads

Writers create new row versions instead of overwriting, readers see a consistent snapshot, so readers never block writers.

Databases & Architecture1 min read

Read Committed versus Serializable isolation levels

Name the four levels, map each anomaly (dirty read, non-repeatable read, phantom) to the level that blocks it.

Cloud Platforms1 min read

Serverless functions with a relational database

Concurrent function instances each open connections and exhaust the database's bounded pool; fix with a connection proxy or pooler, init-phase reuse, or capped concurrency.

Cloud Platforms1 min read

Data warehouse versus OLTP database

Warehouses use columnar storage for analytical scans, OLTP uses row storage for fast transactions, each fits a different workload.

Docker & Kubernetes1 min read

When to build an Operator vs a Helm chart

Charts handle install-time templating; operators add continuous day-two logic like failover, backups, and scaling for stateful apps.

How do you speed up slow integration tests without compromising quality?
CI/CD & Automation2 min read

How do you speed up slow integration tests without compromising quality?

Tests your ability to optimize CI/CD pipelines while preserving coverage. A strong answer covers parallel execution, Test Impact Analysis, ephemeral containers, and test data as code. Red flag: proposing to delete tests or disable integration stage entirely.

Describe the difference between a Deployment and a StatefulSet
CI/CD & Automation2 min read

Describe the difference between a Deployment and a StatefulSet

Tests stateful pod identity versus stateless scaling. Outline: contrast Deployments' interchangeable replicas with StatefulSets' stable hostnames, per-pod PVCs, and ordered rollout; give a database example.

Python & FastAPI2 min read

How do you manage configuration and secrets for a containerized FastAPI app?

Tests 12-factor config separation and Docker secret hygiene. A strong answer uses pydantic-settings with runtime env vars, lru_cache, and keeps .env out of the image. Red flag: baking credentials into Dockerfile layers or committing .env files.

Python & FastAPI2 min read

Explain FastAPI dependency overrides with an in-memory SQLite test example

This tests FastAPI's hook for swapping dependencies cleanly in tests. A strong answer names app.dependency_overrides, defines a test-only in-memory SQLite session, and handles teardown. A red flag is patching globals or mocking ORM instead of dependency.

Describe SQLAlchemy setup in FastAPI from database config to endpoint
Python & FastAPI2 min read

Describe SQLAlchemy setup in FastAPI from database config to endpoint

Tests FastAPI dependency injection and SQLAlchemy session lifecycle. Good answers cover: engine with pooling, declarative models, a yield-based session dependency, and endpoint queries. Red flag: engine per request or global session shared everywhere.

Python & FastAPI2 min read

How would you override a FastAPI dependency during testing?

Tests your grasp of FastAPI's dependency override mechanism. A strong answer mentions app.dependency_overrides, notes that sub-dependencies are bypassed, and stresses clearing overrides after each test.

How does Uvicorn use asyncio to handle thousands of concurrent connections?
Python & FastAPI2 min read

How does Uvicorn use asyncio to handle thousands of concurrent connections?

Tests async concurrency and the GIL. Great answers cover the event loop suspending coroutines at await, Uvicorn interleaving connections, and multi-process workers for parallelism. Red flag: claiming asyncio uses threads per request or bypasses the GIL.

Python Async Context Managers
Python & FastAPI2 min read

Python Async Context Managers

Async context managers let you await during setup and teardown. Use async with for database connections or streams where acquiring and releasing both need I/O. The footgun is applying @contextmanager to async cleanup, which cannot await and will crash.

How would you technically evaluate a major product pivot?
Product Strategy2 min read

How would you technically evaluate a major product pivot?

Structured feasibility under uncertainty. Strong answers: define requirements and SLOs, timebox spikes to de-risk unknowns, audit architecture, data, infra, security, and team skills against thresholds.

Node.js & Express2 min read

Callback Hell: The Pyramid of Doom

Callback hell is what happens when nested async callbacks indent so deeply the code forms an unreadable pyramid. You see it in legacy Node.js when chaining database queries or file reads.

Design a highly available entitlements service with caching
Growth & Experimentation2 min read

Design a highly available entitlements service with caching

This tests balancing read performance with consistency in access control. A strong answer proposes tiered caching with proactive invalidation, read-optimized hot paths, and event-sourced temporary grants.

Growth & Experimentation2 min read

Design a near real-time user interaction tracking and analytics system

Tests decoupling ingestion from querying with justified tech choices. Outline: client → Kafka → Flink → ClickHouse → API; budget sub-30s latency and backpressure per stage. Red flag: one monolithic RDBMS or batch ETL handling both writes and reads.

Databases & Architecture2 min read

What is the difference between DDL and DML in SQL?

DDL shapes schema with CREATE or ALTER; DML handles row-level data with SELECT, INSERT, UPDATE, or DELETE.

Databases & Architecture2 min read

Backpressure: Slow the Producer or Crash

Backpressure is a feedback signal telling upstream to slow down when downstream cannot keep up. You see it in stream processors like Flink or Kafka where a slow consumer risks memory exhaustion. Ignore it and queues grow until the service crashes.