November 2026
Posts published on funGyaan in November 2026.
November 2026
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
-
What really happened in the Microsoft 365 outage?
On 12 November 2026, Outlook, Teams, SharePoint and Copilot went down worldwide for a day. Microsoft's final report traces it to a months-old fix on its gateway servers, a Teams failover, maintenance and peak traffic, spread worldwide by its own traffic management. The full timeline, the…
-
How do you deliver webhooks so no event is ever lost?
Write every event to an outbox, retry with backoff and jitter for a day or more, sign each request with a timestamp, and let receivers replay what they missed. Receivers answer fast, deduplicate by event ID and never trust order. The design, and the quiet failure it prevents.
-
How does a voice AI agent reply in under a second?
By never waiting for anything to finish: streaming speech recognition, a turn detector, a model that streams its first words and speech synthesis that starts speaking them at once. The latency budget, the tricks that win back time, and why knowing you've finished is the hard part.
-
What happens when you call a company's support number?
A support call is two journeys: SIP signalling sets it up, RTP packets carry your voice. Between them sit a border controller, a media server running the menu, a queue that picks the agent, and a recorder. Here is the whole path, and the bug that hides in the gap.
-
What happens when you type a search into Google and press Enter?
A tour from the keystroke to the painted page: the browser, DNS, TCP/TLS vs QUIC, the edge, a query fanned out to thousands of index servers, and the response streamed back. What each step costs, what can fail, and why the slowest server decides how fast the page is.
-
How do two replicas find what's different without sending everything?
Comparing two replicas of a million 200-byte records: a full copy is 203 MiB, a hash per key 43 MiB. A Merkle tree found one changed key with 2 KiB of hashes and ten changed keys with 15 KiB. The catch is round trips: a deeper tree sends fewer bytes but needs more of them. Measured, with the code.
-
Why does one long-running transaction slow down the whole database?
Databases keep old row versions for as long as any open transaction might need them. One idle transaction on an unrelated table made PostgreSQL's busiest table 200× bigger and its writes 3× slower; in MySQL it made the old transaction's own reads 250× slower. Measured, with the settings that…
-
How should you store passwords?
With a slow, memory-hard password hash (argon2id, or scrypt or bcrypt), a unique salt per password, and settings that make each guess cost tens of milliseconds. A fast hash like SHA-256 lets a GPU try billions of guesses a second. Plus the parts around the hash that matter as much: rate limits…
-
Lambda, Fargate or EC2: how do you decide on cost?
You pay Lambda per request and per millisecond, Fargate per second of reserved vCPU and memory, and EC2 per instance-hour whether busy or not. The cheapest choice depends on utilisation: spiky and idle favours Lambda, steady and busy favours EC2, and the crossover is worth calculating for your own…
-
What happens when you reset a few commits and force-push?
Force-pushing after a reset moves the branch pointer on the server; it doesn't delete anything. The dropped commits live on in reflogs, in every teammate's clone and, on GitHub, by SHA. What each teammate sees next depends on how they pull: a merge-pull brings the commits back, a rebase-pull…
-
How do you keep two systems consistent without distributed transactions?
An order in one database, its payment in another, and a process that can die between them. Dual writes, two-phase commit, sagas and the outbox, each run 1,000 times with crashes injected: what goes wrong, what recovers, and what two-phase commit's in-doubt transactions block.
-
How do you find what's nearby?
Among a million points across India, finding everything within 1 km took 104 ms with a full scan, 1.2 ms with geohash cells and 43 µs with a quadtree, all returning the same results. Geohashes are simple and fit any key-value store; quadtrees adapt to density. Measured, plus what PostGIS and Redis…
-
What does ACID actually promise, and what do you lose with BASE?
ACID is four separate promises, and most 'NoSQL vs SQL' arguments mix them up. Money transfers in PostgreSQL, MongoDB and DynamoDB, with and without transactions, with crashes: what each letter bought, measured, and why atomic writes still aren't enough if your reads aren't snapshots.
-
How do you add a cache node without moving every key?
hash(key) % N moves 91% of keys when you add an 11th node. Consistent hashing, rendezvous hashing and jump hash move 9%. Measured on a million keys: keys moved, balance, lookup cost, and which one to pick.
-
What's the cheapest disaster recovery that actually works?
Backups you've never restored are a hope. Two numbers decide a disaster-recovery plan: how much data you can lose (RPO) and how long you can be down (RTO). Measured on a 1 GB PostgreSQL database: a nightly dump vs continuous WAL archiving, with the server and its disk deleted mid-write.
-
How do queues schedule millions of delayed retries?
"Retry this in 30 seconds", a million times over. A min-heap, a timing wheel, and a row in PostgreSQL with an index on its due time, measured: what each costs to add, cancel and fire, how late jobs run, and what survives a restart.
-
Why isn't a Redis lock enough?
A Redis lock is a lease: it expires whether or not its holder is done. Measured with Redis 7.4 and PostgreSQL 17: a paused holder overwriting newer data, a release that frees someone else's lock, a cron job running twice, and what fixes each.
-
Why is there an append-only log under queues, databases and the outbox?
PostgreSQL's WAL, Kafka's partitions, a transactional outbox and an event-sourced store are all the same structure: records appended to the end, read in order, never changed. Why appending is the shape durability takes, what an fsync costs, and how group commit gets 30x more out of the same disk…
-
Should you lock the row or retry on conflict?
Pessimistic locking (SELECT … FOR UPDATE) vs optimistic retries (a version column) vs a single atomic UPDATE, measured on PostgreSQL 17 at high and low contention, plus 50 buyers rushing the last 10 tickets.
-
Why did adding a cache make our data wrong?
A cache is a second copy of your data with its own rules, and every way it can disagree with the database shows up as a bug. Five failure modes measured with Redis in front of PostgreSQL, and the fix for each.
-
Why does my Postgres query get slower as the table grows, even with an index?
An index only helps when Postgres can stop early or touch few pages. Six measured reasons it can't, from 10K to 10M rows, and the fix for each.
-
How do you generate unique IDs across many servers?
Inserting 5 million rows with random UUIDv4 keys took 34 s and left a 196 MB index at 69% fill; time-ordered UUIDv7 took 21 s with a 150 MB index at 90%; plain bigint 24 s and 107 MB. Database sequences, UUIDv4, UUIDv7 and Snowflake-style IDs compared, measured on PostgreSQL, with when to use which.
-
How do you check "have we seen this?" for millions of items cheaply?
An exact set of a million emails took 56 MB; a Bloom filter answering the same question with 1% false positives took 1.2 MB. Bloom vs cuckoo vs an exact set, measured: memory, false positives, deletes, and what happens when you overfill them.
-
Why are some databases fast at writes and others at reads?
Under the hood, most databases are either a B-tree or an LSM tree. A B-tree updates data where it lives and pays for random writes; an LSM tree appends and sorts later, and pays at read time. Measured with the engines under etcd and CockroachDB: 54× vs 7× bytes written per byte stored, and reads…
-
A user says a page has started lagging: how do you debug it end to end?
Narrow it down before you open a profiler: who, which page, since when. Then measure one layer at a time (browser, network, server, database, dependencies) until one of them owns the time. Five server-side causes measured with OpenTelemetry traces, and the signature each leaves.
-
Which cache eviction policy keeps the most hits?
On skewed traffic, LFU and W-TinyLFU kept 49% hits in a cache holding 1% of keys, against LRU's 40%. A one-off scan cut LRU to 26% for a while. When popularity moved to new keys, plain LFU collapsed from 51% to 13% and stayed there; W-TinyLFU recovered to 47%. Measured, with the code.
-
How do you scale an API on AWS?
The AWS building blocks for each scaling technique (CloudFront and ElastiCache for caching, ALB and Auto Scaling for replicas, RDS Proxy for connections, Aurora replicas for reads, SQS for spikes, WAF for abusive clients), in the order you'd reach for them.
-
How do you match messy part numbers to a catalog?
Customers write 'brg-6204 2rs', 'BRG62O4RS' and 'sealed bearing 6204'. Exact maps, normalised keys, edit distance and token overlap each catch a different kind of mess, and each has a data structure that keeps it fast at 100,000 parts. Measured.
-
How do you know an LLM feature works before you ship it?
'It looked good on ten examples' is how LLM features fail in production. Golden sets, held-out data, LLM-as-judge and production signals, compared, with real numbers from a document-extraction pipeline: zero errors on the data it was tuned on, 0.4% on data it had never seen.
-
How do you scale an API?
Find the bottleneck first, then use the cheapest lever that removes it: fix the query, cache the read, pool the connections, add replicas, queue the slow writes, limit each client. Each lever measured on one machine: what it bought, and what it cost.
-
Postgres or DynamoDB for a new SaaS?
DynamoDB is superb at the questions you designed it for and expensive at the ones you didn't; PostgreSQL answers questions you haven't thought of yet. The same 200,000 orders in both: 0.5 read units for the planned query, 2,689 for an unplanned report that PostgreSQL ran in 13 ms without an index.
-
CAP or PACELC: what trade-off do you make when nothing is broken?
CAP describes the rare moment the network splits. PACELC adds the trade-off you make all day: a fresher answer costs latency. Measured on a PostgreSQL primary and replica: how often reading your own write is stale, what each synchronous_commit level costs, and what happens when the replica is gone.
-
How do you find the top 10 among billions of events?
Counting every key exactly took 58-149 MiB for 5 million keys. A count-min sketch with a small heap found the true top 10 in 2 MiB; Space-Saving did it in 62 KiB. With too few counters on flatter traffic, Space-Saving found only 2 of the 10. Measured, and when each one is safe.
-
Do I need Kubernetes?
Probably not yet. Plain EC2 with Docker, or ECS on Fargate, runs most small and mid-sized products with far less to operate. When Kubernetes (EKS) earns its complexity, and what each option costs you in money, people and on-call.
-
Read replicas, partitioning or sharding: what does each one fix?
Three ways to outgrow one database, often confused. Replicas add read capacity and cost you freshness. Partitioning keeps one huge table manageable but adds no capacity. Sharding adds write capacity and costs you almost everything that was easy. Measured on PostgreSQL 17: replica staleness, and…
-
If MongoDB is schemaless, why do we write Mongoose schemas? Why not one collection for everything?
MongoDB stores whatever you write; Mongoose checks only what goes through Mongoose, and not all of that. Measured on MongoDB 8.2: what each layer enforces, and what one shared collection costs.
-
How does a leaderboard stay sorted under constant updates?
At a million players, a skip list updated a score in 6 µs and found a player's rank in 3 µs. A sorted array found ranks fast but took 3.4 ms per update; a plain map updated in nanoseconds but needed 22 ms per rank. That's why Redis sorted sets use skip lists. Measured, with the code.
-
How do you migrate a live database without downtime?
Most outages during migrations aren't failed migrations; they're migrations that held a lock while traffic queued behind them. Measured on a 5M-row table under load: one-step changes that stalled every request for 2-8 seconds, and the online versions that stalled them for a fraction of a second…
-
When should a write go through a queue instead of the API?
Queue the work behind a write when it's slow, unreliable or can finish after you answer; keep it synchronous when the caller needs the result. And never publish from the request itself: use an outbox.
-
SQS, SNS or EventBridge: which one for which job?
Three AWS messaging services that overlap enough to confuse: a queue for work, a topic for fan-out, and an event bus for routing by content. What each guarantees, how each fails, and the combinations most systems actually use.
-
How do you count unique visitors without storing them?
An exact set of 10 million visitor IDs took 289 MiB. A HyperLogLog sketch of 16 KiB counted them within about 1%, and seven daily sketches merged into a weekly count without the raw data. How it works, measured at four precisions, and where Redis and PostgreSQL already have it.