東風

232 posts

東風 banner
東風

東風

@chownvon

📚🧱

hangzhou Katılım Kasım 2015
412 Takip Edilen33 Takipçiler
Abhishek Singh
Abhishek Singh@0xlelouch_·
Do not use UUID as your primary key by default, use BIGINT identity for OLTP (smaller indexes, faster joins) and add UUID only when you need cross-system uniqueness. Do not use OFFSET pagination on big tables, use keyset pagination (WHERE id > last_id ORDER BY id LIMIT n) with a stable index. Do not use SELECT * in hot paths, use narrow selects (only columns you need) + cover with the right index. Do not use COUNT(*) on a giant table for UX counters, use approx counts / cached counters / rollups depending on accuracy needs. Do not use JSONB for everything, use proper relational columns for fields you filter/sort on, keep JSONB for truly flexible metadata. Do not use EAV schemas (“key/value tables”) for core entities, use normal forms + migrations (EAV becomes un-indexable pain). Do not use “one index per query” guesswork, use EXPLAIN (ANALYZE, BUFFERS) and index what your workload actually does. Do not use big multi-table joins for dashboards, use ETL/CDC into OLAP (ClickHouse/Druid/BigQuery) and query there. Do not use sync writes to multiple DBs, use outbox pattern + CDC so data movement is replayable and consistent. Do not use triggers for business logic, use application-level writes (triggers become invisible dependencies and debugging hell). Do not use serializable isolation everywhere, use the lowest isolation that meets correctness + explicit locks only where needed. Do not use long transactions, use short transactions (long txns = bloat, locks, vacuum issues, replica lag). Do not use “DB is slow, add replicas” first, use query shaping + indexes + connection pool sanity + caching (in that order). Do not use “just increase max_connections”, use pooling (PgBouncer) + right-sized pools (too many connections kills throughput). Do not use hot partitions / single shard keys, use evenly distributed keys or composite sharding to avoid hotspots. Do not use ad-hoc migrations in prod, use online migration patterns (expand/contract, backfills, dual writes when needed). Do not use no backups because “we have replicas”, use tested restores + PITR (a replica is not a backup). Do not use “we’ll clean it later” retention, use TTL/partition drop for time-series and audit logs (deletes don’t scale). Do not use indexing without considering writes, use the minimum indexes that hit your p95 (each index is a write tax). Do not use text search via LIKE '%foo%', use proper search (Postgres GIN/tsvector) or a search engine when ranking matters. Do not use cache as truth, use DB as source of truth and caches as derived state with invalidation strategy.
Abhishek Singh@0xlelouch_

Do not use REST + polling + “is it done?” endpoints, use async jobs + webhook/callbacks + idempotency keys. Do not use cron + bash scripts + hope, use a workflow engine (Temporal / Argo Workflows) with retries, timeouts, and history. Do not use “logs in prod” debugging, use distributed tracing + correlation IDs + structured logs. Do not use manual SSH fixes on servers, use immutable deployments (containers/images) + GitOps. Do not use one giant DB for everything, use Postgres for OLTP + a real OLAP store for analytics (ClickHouse/Druid) and keep them separate. Do not use offset pagination at scale, use cursor/keyset pagination with stable ordering. Do not use global mutexes for rate limits, use token bucket with Redis/Lua or a dedicated rate-limit service. Do not use “exactly once” promises to sleep at night, use at-least-once + dedupe keys + idempotent handlers. Do not use Kafka as a queue for retries, use DLQ + retry topics + backoff (or a real queue like SQS) depending on semantics. Do not use “cache everything” reflexively, use caching only with correctness guarantees (TTL + stampede protection + versioned keys). Do not use “one config per env” copied around, use a single config schema + typed validation + runtime reload. Do not use ad-hoc feature flags in code, use a flag service + kill switches + gradual rollouts. Do not use dashboards as your alerting system, use SLOs + error budgets + actionable alerts (not spam). Do not use “k8s will autoscale it” as capacity planning, use load tests + p95/p99 budgets + real headroom math. Do not use “JWT everywhere” blindly, use short-lived access tokens + refresh + revocation strategy (or sessions when you need instant logout). Do not use “one big microservice mesh” to fix architecture, use clear boundaries + contracts + fewer services with better ownership. Do not use “just add more replicas” for DB pressure, use query shaping + indexes + caching + read replicas (in that order).

English
17
81
920
188.2K
東風
東風@chownvon·
明日复明日,明日何其多。 动起来才有意义
東風 tweet media
中文
0
0
0
36
東風
東風@chownvon·
不必后悔未早点开始,现在开始也为时未晚
東風 tweet media
中文
0
0
0
18
東風
東風@chownvon·
从2018年下半年起,台积电加大了砍价的力度,陶氏化学才借此机会凭低价格入围。陶氏化学作为光刻胶的新晋供应商,可能对有些流程还不太熟悉,与台积电在沟通上出了差错,才酿成这起事故。
中文
0
0
0
73
東風
東風@chownvon·
降本增笑?🤣
東風 tweet media
日本語
1
0
0
22
東風
東風@chownvon·
知识只有付诸实践才有价值。重要的不是知道多少,而是如何运用。真正的智慧体现在行动、决策和结果中。学习而不实践,就像有地图却从未踏上旅程。
中文
0
0
0
22
東風
東風@chownvon·
知识的目的是行动,而不是知识。 — 亚里士多德
東風 tweet media
中文
1
0
0
22
東風
東風@chownvon·
张忠谋与英特尔的创始人是同一年代的人,他一口气熬掉了英特尔6任CEO。不能不说,这是一个奇迹。在高科技企业,“经理人每天都在折旧”,张忠谋必须每天至少花两个小时在“有目标、有纪律、有计划”的学习上,了解行业最前沿的技术动态,才能够连续几十年都一直站在时代的潮头上
中文
0
0
0
43
東風
東風@chownvon·
不管人生或事业,都是跑马拉松,成功往往是长久的努力,不是一两年就能做到,今天成功,也不代表永远成功。 —张忠谋
東風 tweet media
中文
1
0
0
28
東風
東風@chownvon·
人之患,在好为人师。 —孟子
東風 tweet media
中文
0
0
0
14
東風
東風@chownvon·
必须尝试,因为即使失败,也比从未尝试要好。 —富兰克林·D·罗斯福
東風 tweet media
中文
0
0
0
23
東風
東風@chownvon·
永远不要着急,静静地、平和地做每件事。不要因为任何事情而失去内心的平静,即使你的整个世界似乎都乱了套。 —圣方济各·德·塞勒斯
東風 tweet media
中文
0
0
0
22
東風
東風@chownvon·
我们很少信任比我们好的人,这可太真实了。我们宁肯避免与他们往来。相反,最为经常的是我们对和我们相似、和我们有着共同弱点的人吐露心迹。因此,我们并不希望改掉我们的弱点,也不希望变得更好,我们大概首先应该被判犯了错误。我们只是希望在我们的道路上受到怜悯和鼓励。 —加缪
東風 tweet media
中文
0
0
0
28