Home/Categories/云原生

云原生

DevOps、Docker、Kubernetes、可观测性

Collection

This collection features articles and community discussions in the 云原生 space, focusing on real-world engineering scenarios, tool selection, practical paths, and risk boundaries.

The page is continuously updated and serves as a learning roadmap, technology selection reference, and technical review entry point.

@admin·10 min read·Cloud Native

PostgreSQL Triggers and Stored Functions

Some logic is more efficient in the database, including automatic auditing, cascading updates, and data validation. But overusing triggers makes behavior implicit and hard to debug. This article explains how PostgreSQL triggers and functions work, when to use them, when not to, and why triggers demand restraint.

#DevOps♥ 1120 comments
@admin·9 min read·Cloud Native

Background Job Queue Design: Move Slow Work Out of the Request

Sending emails, generating reports, and processing uploads time out inside a request—move them to a background queue. This article covers the queue core (enqueue/worker/retry/monitoring), tech selection (BullMQ/Sidekiq/Celery), delayed and scheduled jobs, idempotency, and how to decide “what should be async.”

#DevOps♥ 1140 comments
@admin·10 min read·Cloud Native

Read Replicas and Read/Write Splitting

Read-heavy and write-light? Add read replicas to spread reads across databases while the primary handles writes. This article covers primary-replica architecture, application- and proxy-level routing, replication-lag consistency traps, and when read replicas are or are not appropriate.

#DevOps♥ 1150 comments
@admin·12 min read·Cloud Native

PostgreSQL Locks and Deadlocks

Locks preserve correctness during concurrent writes, but poor locking causes delays and deadlocks. This article explains PostgreSQL row, table, and advisory locks, automatic deadlock detection, concurrency control with SELECT FOR UPDATE, and ways to reduce contention through short transactions, consistent lock ordering, and optimistic locking.

#DevOps♥ 1170 comments
@admin·8 min read·Cloud Native

Change Data Capture: Real-Time Data Synchronization

Manually trigger downstream synchronization after every database change? CDC automatically captures changes and streams them to search, caches, data warehouses, and services in real time. Learn how WAL-based CDC works, how Debezium implements it, where it fits, and why it outperforms dual writes and scheduled polling.

#DevOps♥ 1210 comments
@admin·12 min read·Cloud Native

PostgreSQL Extension Ecosystem: More Than a Database

PostgreSQL's killer feature is its extension ecosystem: pgvector for vector search, PostGIS for geospatial data, TimescaleDB for time series, and zhparser for Chinese tokenization. This guide covers their value, 10 popular extensions, installation and management, and when one PG instance can replace multiple components.

#DevOps♥ 1230 comments
@admin·11 min read·Cloud Native

Deep Dive into Sharding: Shard Keys and Cross-Shard Queries

Sharding is more than splitting data: a bad shard key forces full scans, while cross-shard joins, aggregation, and pagination become painful. This article covers shard-key design, application merging, denormalization, CQRS, globally unique Snowflake IDs, and why you should usually avoid sharding at first.

#DevOps♥ 1260 comments
@admin·9 min read·Cloud Native

PostgreSQL Window Functions in Practice

Need the top 3 per category, running totals, or per-group rankings? Window functions handle them in one SQL query without GROUP BY plus subqueries. Learn the core concepts of OVER, PARTITION BY, ORDER BY, and frames; common ranking, cumulative, year-over-year, and top-N patterns; and the fundamental difference from GROUP BY.

#DevOps♥ 1280 comments